(function($){ "use strict"; window.mkd={}; mkd.modules={}; mkd.scroll=0; mkd.window=$(window); mkd.document=$(document); mkd.windowWidth=$(window).width(); mkd.windowHeight=$(window).height(); mkd.body=$('body'); mkd.html=$('html, body'); mkd.menuDropdownHeightSet=false; mkd.defaultHeaderStyle=''; mkd.minVideoWidth=1500; mkd.videoWidthOriginal=1280; mkd.videoHeightOriginal=720; mkd.videoRatio=1280/720; switch(true){ case mkd.body.hasClass('mkd-grid-1300'): mkd.boxedLayoutWidth=1350; break; case mkd.body.hasClass('mkd-grid-1200'): mkd.boxedLayoutWidth=1250; break; case mkd.body.hasClass('mkd-grid-1000'): mkd.boxedLayoutWidth=1050; break; case mkd.body.hasClass('mkd-grid-800'): mkd.boxedLayoutWidth=850; break; default : mkd.boxedLayoutWidth=1150; break; } $(document).ready(function(){ mkd.scroll=$(window).scrollTop(); if(mkd.body.hasClass('mkd-dark-header')){ mkd.defaultHeaderStyle='mkd-dark-header';} if(mkd.body.hasClass('mkd-light-header')){ mkd.defaultHeaderStyle='mkd-light-header';}}); $(window).resize(function(){ mkd.windowWidth=$(window).width(); mkd.windowHeight=$(window).height(); }); $(window).scroll(function(){ mkd.scroll=$(window).scrollTop(); }); })(jQuery); (function($){ "use strict"; var common={}; mkd.modules.common=common; common.mkdIsTouchDevice=mkdIsTouchDevice; common.mkdDisableSmoothScrollForMac=mkdDisableSmoothScrollForMac; common.mkdFluidVideo=mkdFluidVideo; common.mkdPreloadBackgrounds=mkdPreloadBackgrounds; common.mkdPrettyPhoto=mkdPrettyPhoto; common.mkdCheckHeaderStyleOnScroll=mkdCheckHeaderStyleOnScroll; common.mkdInitParallax=mkdInitParallax; common.mkdSmoothScroll=mkdSmoothScroll; common.mkdEnableScroll=mkdEnableScroll; common.mkdDisableScroll=mkdDisableScroll; common.mkdWheel=mkdWheel; common.mkdKeydown=mkdKeydown; common.mkdPreventDefaultValue=mkdPreventDefaultValue; common.mkdOwlSlider=mkdOwlSlider; common.mkdInitSelfHostedVideoPlayer=mkdInitSelfHostedVideoPlayer; common.mkdSelfHostedVideoSize=mkdSelfHostedVideoSize; common.mkdInitBackToTop=mkdInitBackToTop; common.mkdBackButtonShowHide=mkdBackButtonShowHide; common.mkdSmoothTransition=mkdSmoothTransition; $(document).ready(function(){ mkdIsTouchDevice(); mkdDisableSmoothScrollForMac(); mkdFluidVideo(); mkdPreloadBackgrounds(); mkdPrettyPhoto(); mkdInitElementsAnimations(); mkdInitAnchor().init(); mkdInitVideoBackground(); mkdInitVideoBackgroundSize(); mkdSetContentBottomMargin(); mkdSmoothScroll(); mkdOwlSlider(); mkdInitSelfHostedVideoPlayer(); mkdSelfHostedVideoSize(); mkdInitBackToTop(); mkdBackButtonShowHide(); mkdSmoothTransition(); }); $(window).load(function(){ mkdCheckHeaderStyleOnScroll(); mkdInitParallax(); }); $(window).resize(function(){ mkdInitVideoBackgroundSize(); mkdSelfHostedVideoSize(); }); function mkdIsTouchDevice(){ if(Modernizr.touch&&!mkd.body.hasClass('mkd-no-animation-on-touch')){ mkd.body.addClass('mkd-no-animation-on-touch'); }} function mkdDisableSmoothScrollForMac(){ var os=navigator.appVersion.toLowerCase(); if(os.indexOf('mac') > -1&&mkd.body.hasClass('mkd-smooth-scroll')){ mkd.body.removeClass('mkd-smooth-scroll'); }} function mkdFluidVideo(){ fluidvids.init({ selector: ['iframe'], players: ['www.youtube.com', 'player.vimeo.com'] }); } function mkdOwlSlider(){ var sliders=$('.mkd-owl-slider'); if(sliders.length){ sliders.each(function(){ var slider=$(this); slider.owlCarousel({ singleItem: true, transitionStyle: 'fadeUp', navigation: true, autoHeight: true, pagination: false, navigationText: [ '', '' ] }); }); }} function mkdPreloadBackgrounds(){ $(".mkd-preload-background").each(function(){ var preloadBackground=$(this); if(preloadBackground.css("background-image")!==""&&preloadBackground.css("background-image")!="none"){ var bgUrl=preloadBackground.attr('style'); bgUrl=bgUrl.match(/url\(["']?([^'")]+)['"]?\)/); bgUrl=bgUrl ? bgUrl[1]:""; if(bgUrl){ var backImg=new Image(); backImg.src=bgUrl; $(backImg).load(function(){ preloadBackground.removeClass('mkd-preload-background'); }); }}else{ $(window).load(function(){ preloadBackground.removeClass('mkd-preload-background'); }); }}); } function mkdPrettyPhoto(){ var markupWhole='
\
 
\
\
\
\
\
\
\
\
\
\
\
\ Expand \
\ \ \
\
\
\
\ Previous \

0/0

\ Next \
\

\ {pp_social} \ Close \
\
\
\
\
\
\
\
\
\
\
\
\
'; $("a[data-rel^='prettyPhoto']").prettyPhoto({ hook: 'data-rel', animation_speed: 'normal', slideshow: false, autoplay_slideshow: false, opacity: 0.80, show_title: true, allow_resize: true, horizontal_padding: 0, default_width: 960, default_height: 540, counter_separator_label: '/', theme: 'pp_default', hideflash: false, wmode: 'opaque', autoplay: true, modal: false, overlay_gallery: false, keyboard_shortcuts: true, deeplinking: false, custom_markup: '', social_tools: false, markup: markupWhole }); } function mkdCheckHeaderStyleOnScroll(){ if($('[data-mkd_header_style]').length > 0&&mkd.body.hasClass('mkd-header-style-on-scroll')){ var waypointSelectors=$('.mkd-full-width-inner > .wpb_row.mkd-section, .mkd-full-width-inner > .mkd-parallax-section-holder, .mkd-container-inner > .wpb_row.mkd-section, .mkd-container-inner > .mkd-parallax-section-holder, .mkd-portfolio-single > .wpb_row.mkd-section'); var changeStyle=function(element){ (element.data("mkd_header_style")!==undefined) ? mkd.body.removeClass('mkd-dark-header mkd-light-header').addClass(element.data("mkd_header_style")):mkd.body.removeClass('mkd-dark-header mkd-light-header').addClass(''+mkd.defaultHeaderStyle); }; waypointSelectors.waypoint(function(direction){ if(direction==='down'){ changeStyle($(this.element)); }}, { offset: 0}); waypointSelectors.waypoint(function(direction){ if(direction==='up'){ changeStyle($(this.element)); }}, { offset: function(){ return -$(this.element).outerHeight(); }}); }} function mkdInitElementsAnimations(){ var touchClass=$('.mkd-no-animations-on-touch'), noAnimationsOnTouch=true, elements=$('.mkd-grow-in, .mkd-fade-in-down, .mkd-element-from-fade, .mkd-element-from-left, .mkd-element-from-right, .mkd-element-from-top, .mkd-element-from-bottom, .mkd-flip-in, .mkd-x-rotate, .mkd-z-rotate, .mkd-y-translate, .mkd-fade-in, .mkd-fade-in-left-x-rotate'), clasess, animationClass; if(touchClass.length){ noAnimationsOnTouch=false; } var animationClasses=['mkd-grow-in', 'mkd-fade-in-down', 'mkd-element-from-fade', 'mkd-element-from-left', 'mkd-element-from-right', 'mkd-element-from-top', 'mkd-element-from-bottom', 'mkd-flip-in', 'mkd-x-rotate', 'mkd-z-rotate', 'mkd-y-translate', 'mkd-fade-in', 'mkd-fade-in-left-x-rotate']; if(elements.length > 0&&noAnimationsOnTouch){ elements.each(function(){ var element=$(this); clasess=element.attr('class').split(/\s+/); if(animationClasses.indexOf(clasess[0])!==-1){ animationClass=clasess[0]; }else{ animationClass=clasess[1]; } element.appear(function(){ element.addClass(animationClass+'-on'); },{accX: 0, accY: mkdGlobalVars.vars.mkdElementAppearAmount}); }); }} function mkdInitParallax(){ if($('.mkd-parallax-section-holder').length){ $('.mkd-parallax-section-holder').each(function(){ var parallaxElement=$(this); if(parallaxElement.hasClass('mkd-full-screen-height-parallax')){ parallaxElement.height(mkd.windowHeight); parallaxElement.find('.mkd-parallax-content-outer').css('padding',0); } parallaxElement.css({opacity:1}); var speed=parallaxElement.data('mkd-parallax-speed')*0.4; parallaxElement.parallax("50%", speed); }); }} var mkdInitAnchor=mkd.modules.common.mkdInitAnchor=function(){ var setActiveState=function(anchor){ $('.mkd-main-menu .mkd-active-item, .mkd-mobile-nav .mkd-active-item, .mkd-vertical-menu .mkd-active-item').removeClass('mkd-active-item'); anchor.parent().addClass('mkd-active-item'); $('.mkd-main-menu a, .mkd-mobile-nav a, .mkd-vertical-menu a').removeClass('current'); anchor.addClass('current'); }; var checkActiveStateOnScroll=function(){ $('[data-mkd-anchor]').waypoint(function(direction){ if(direction==='down'){ setActiveState($("a[href='"+window.location.href.split('#')[0]+"#"+$(this.element).data("mkd-anchor")+"']")); }}, { offset: '50%' }); $('[data-mkd-anchor]').waypoint(function(direction){ if(direction==='up'){ setActiveState($("a[href='"+window.location.href.split('#')[0]+"#"+$(this.element).data("mkd-anchor")+"']")); }}, { offset: function(){ return -($(this.element).outerHeight() - 150); }}); }; var checkActiveStateOnLoad=function(){ var hash=window.location.hash.split('#')[1]; if(hash!==""&&$('[data-mkd-anchor="'+hash+'"]').length > 0){ $("a[href='"+window.location.href.split('#')[0]+"#"+hash).trigger("click"); }}; var headerHeihtToSubtract=function(anchoredElementOffset){ if(mkd.modules.header.behaviour=='mkd-sticky-header-on-scroll-down-up'){ (anchoredElementOffset > mkd.modules.header.stickyAppearAmount) ? mkd.modules.header.isStickyVisible=true:mkd.modules.header.isStickyVisible=false; } if(mkd.modules.header.behaviour=='mkd-sticky-header-on-scroll-up'){ (anchoredElementOffset > mkd.scroll) ? mkd.modules.header.isStickyVisible=false:''; } var headerHeight=mkd.modules.header.isStickyVisible ? mkdGlobalVars.vars.mkdStickyHeaderTransparencyHeight:mkdPerPageVars.vars.mkdHeaderTransparencyHeight; return headerHeight; }; var anchorClick=function(){ mkd.document.on("click", ".mkd-main-menu a, .mkd-vertical-menu a, .mkd-btn, .mkd-anchor,.mkd-mobile-nav a", function(){ var scrollAmount; var anchor=$(this); var hash=anchor.prop("hash").split('#')[1]; if(hash!==""&&$('[data-mkd-anchor="' + hash + '"]').length > 0&&anchor.attr('href').split('#')[0]==window.location.href.split('#')[0]){ var anchoredElementOffset=$('[data-mkd-anchor="' + hash + '"]').offset().top; scrollAmount=$('[data-mkd-anchor="' + hash + '"]').offset().top - headerHeihtToSubtract(anchoredElementOffset); setActiveState(anchor); mkd.html.stop().animate({ scrollTop: Math.round(scrollAmount) }, 1000, function(){ if(history.pushState){ history.pushState(null, null, '#'+hash); }}); return false; }}); }; return { init: function(){ if($('[data-mkd-anchor]').length){ anchorClick(); checkActiveStateOnScroll(); $(window).load(function(){ checkActiveStateOnLoad(); }); }} };}; function mkdInitVideoBackground(){ $('.mkd-section .mkd-video-wrap .mkd-video').mediaelementplayer({ enableKeyboard: false, iPadUseNativeControls: false, pauseOtherPlayers: false, iPhoneUseNativeControls: false, AndroidUseNativeControls: false }); if(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|Opera Mini)/)){ mkdInitVideoBackgroundSize(); $('.mkd-section .mkd-mobile-video-image').show(); $('.mkd-section .mkd-video-wrap').remove(); }} function mkdInitVideoBackgroundSize(){ $('.mkd-section .mkd-video-wrap').each(function(){ var element=$(this); var sectionWidth=element.closest('.mkd-section').outerWidth(); element.width(sectionWidth); var sectionHeight=element.closest('.mkd-section').outerHeight(); mkd.minVideoWidth=mkd.videoRatio * (sectionHeight+20); element.height(sectionHeight); var scaleH=sectionWidth / mkd.videoWidthOriginal; var scaleV=sectionHeight / mkd.videoHeightOriginal; var scale=scaleV; if(scaleH > scaleV) scale=scaleH; if(scale * mkd.videoWidthOriginal < mkd.minVideoWidth){scale=mkd.minVideoWidth / mkd.videoWidthOriginal;} element.find('video, .mejs-overlay, .mejs-poster').width(Math.ceil(scale * mkd.videoWidthOriginal +2)); element.find('video, .mejs-overlay, .mejs-poster').height(Math.ceil(scale * mkd.videoHeightOriginal +2)); element.scrollLeft((element.find('video').width() - sectionWidth) / 2); element.find('.mejs-overlay, .mejs-poster').scrollTop((element.find('video').height() - (sectionHeight)) / 2); element.scrollTop((element.find('video').height() - sectionHeight) / 2); element.addClass('mkd-video-visible'); }); } function mkdSetContentBottomMargin(){ var uncoverFooter=$('.mkd-footer-uncover'); var content=$('.mkd-content'); if(uncoverFooter.length&&mkd.windowWidth > 600){ content.waitForImages(function(){ content.css('margin-bottom', $('.mkd-footer-inner').height()); }); }} function mkdSmoothScroll(){ if(mkd.body.hasClass('mkd-smooth-scroll')){ var scrollTime=0.4; var scrollDistance=300; var mobile_ie=-1!==navigator.userAgent.indexOf("IEMobile"); var smoothScrollListener=function(event){ event.preventDefault(); var delta=event.wheelDelta / 120||-event.detail / 3; var scrollTop=mkd.window.scrollTop(); var finalScroll=scrollTop - parseInt(delta * scrollDistance); TweenLite.to(mkd.window, scrollTime, { scrollTo: { y: finalScroll, autoKill: !0 }, ease: Power1.easeOut, autoKill: !0, overwrite: 5 }); }; if(!$('html').hasClass('touch')&&!mobile_ie){ if(window.addEventListener){ window.addEventListener('mousewheel', smoothScrollListener, false); window.addEventListener('DOMMouseScroll', smoothScrollListener, false); }} }} function mkdDisableScroll(){ if(window.addEventListener){ window.addEventListener('DOMMouseScroll', mkdWheel, false); } window.onmousewheel=document.onmousewheel=mkdWheel; document.onkeydown=mkdKeydown; if(mkd.body.hasClass('mkd-smooth-scroll')){ window.removeEventListener('mousewheel', smoothScrollListener, false); window.removeEventListener('DOMMouseScroll', smoothScrollListener, false); }} function mkdEnableScroll(){ if(window.removeEventListener){ window.removeEventListener('DOMMouseScroll', mkdWheel, false); } window.onmousewheel=document.onmousewheel=document.onkeydown=null; if(mkd.body.hasClass('mkd-smooth-scroll')){ window.addEventListener('mousewheel', smoothScrollListener, false); window.addEventListener('DOMMouseScroll', smoothScrollListener, false); }} function mkdWheel(e){ mkdPreventDefaultValue(e); } function mkdKeydown(e){ var keys=[37, 38, 39, 40]; for (var i=keys.length; i--;){ if(e.keyCode===keys[i]){ mkdPreventDefaultValue(e); return; }} } function mkdPreventDefaultValue(e){ e=e||window.event; if(e.preventDefault){ e.preventDefault(); } e.returnValue=false; } function mkdInitSelfHostedVideoPlayer(){ var players=$('.mkd-self-hosted-video'); players.mediaelementplayer({ audioWidth: '100%' }); } function mkdSelfHostedVideoSize(){ $('.mkd-self-hosted-video-holder .mkd-video-wrap').each(function(){ var thisVideo=$(this); var videoWidth=thisVideo.closest('.mkd-self-hosted-video-holder').outerWidth(); var videoHeight=videoWidth / mkd.videoRatio; if(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|Opera Mini)/)){ thisVideo.parent().width(videoWidth); thisVideo.parent().height(videoHeight); } thisVideo.width(videoWidth); thisVideo.height(videoHeight); thisVideo.find('video, .mejs-overlay, .mejs-poster').width(videoWidth); thisVideo.find('video, .mejs-overlay, .mejs-poster').height(videoHeight); }); } function mkdToTopButton(a){ var b=$("#mkd-back-to-top"); b.removeClass('off on'); if(a==='on'){ b.addClass('on'); }else{ b.addClass('off'); }} function mkdBackButtonShowHide(){ mkd.window.scroll(function (){ var b=$(this).scrollTop(); var c=$(this).height(); var d; if(b > 0){ d=b + c / 2; }else{ d=1; } if(d < 1e3){ mkdToTopButton('off'); }else{ mkdToTopButton('on'); }}); } function mkdInitBackToTop(){ var backToTopButton=$('#mkd-back-to-top'); backToTopButton.on('click',function(e){ e.preventDefault(); mkd.html.animate({scrollTop: 0}, mkd.window.scrollTop()/3, 'linear'); }); } function mkdSmoothTransition(){ if(mkd.body.hasClass('mkd-smooth-page-transitions')){ $(window).bind("pageshow", function(event){ if(event.originalEvent.persisted){ $('.mkd-wrapper-inner').fadeIn(0); }}); $('a').click(function(e){ var a=$(this); if(e.which==1 && (typeof a.data('rel')==='undefined') && (typeof a.attr('rel')==='undefined') && a.attr('href').indexOf(window.location.host) >=0 && (typeof a.attr('target')==='undefined'||a.attr('target')==='_self') ){ e.preventDefault(); $('.mkd-wrapper-inner').fadeOut(1000, function(){ window.location=a.attr('href'); }); }}); }} })(jQuery); (function($){ "use strict"; var header={}; mkd.modules.header=header; header.isStickyVisible=false; header.stickyAppearAmount=0; header.behaviour; header.mkdSideArea=mkdSideArea; header.mkdSideAreaScroll=mkdSideAreaScroll; header.mkdInitMobileNavigation=mkdInitMobileNavigation; header.mkdMobileHeaderBehavior=mkdMobileHeaderBehavior; header.mkdSetDropDownMenuPosition=mkdSetDropDownMenuPosition; header.mkdDropDownMenu=mkdDropDownMenu; header.mkdSearch=mkdSearch; $(document).ready(function(){ mkdHeaderBehaviour(); mkdSideArea(); mkdSideAreaScroll(); mkdInitMobileNavigation(); mkdMobileHeaderBehavior(); mkdSetDropDownMenuPosition(); mkdDropDownMenu(); mkdSearch(); }); $(window).load(function(){ mkdSetDropDownMenuPosition(); mkdFollowHover(); }); $(window).resize(function(){ mkdDropDownMenu(); }); function mkdHeaderBehaviour(){ var header=$('.mkd-page-header'); var stickyHeader=$('.mkd-sticky-header'); var fixedHeaderWrapper=$('.mkd-fixed-wrapper'); var headerMenuAreaOffset=$('.mkd-page-header').find('.mkd-fixed-wrapper').length ? $('.mkd-page-header').find('.mkd-fixed-wrapper').offset().top:null; var stickyAppearAmount; switch(true){ case mkd.body.hasClass('mkd-sticky-header-on-scroll-up'): mkd.modules.header.behaviour='mkd-sticky-header-on-scroll-up'; var docYScroll1=$(document).scrollTop(); stickyAppearAmount=mkdGlobalVars.vars.mkdTopBarHeight + mkdGlobalVars.vars.mkdLogoAreaHeight + mkdGlobalVars.vars.mkdMenuAreaHeight + mkdGlobalVars.vars.mkdStickyHeaderHeight; var headerAppear=function(){ var docYScroll2=$(document).scrollTop(); if((docYScroll2 > docYScroll1&&docYScroll2 > stickyAppearAmount)||(docYScroll2 < stickyAppearAmount)){ mkd.modules.header.isStickyVisible=false; stickyHeader.removeClass('header-appear').find('.mkd-main-menu .second').removeClass('mkd-drop-down-start'); }else{ mkd.modules.header.isStickyVisible=true; stickyHeader.addClass('header-appear'); } docYScroll1=$(document).scrollTop(); }; headerAppear(); $(window).scroll(function(){ headerAppear(); }); break; case mkd.body.hasClass('mkd-sticky-header-on-scroll-down-up'): mkd.modules.header.behaviour='mkd-sticky-header-on-scroll-down-up'; stickyAppearAmount=mkdPerPageVars.vars.mkdStickyScrollAmount!==0 ? mkdPerPageVars.vars.mkdStickyScrollAmount:mkdGlobalVars.vars.mkdTopBarHeight + mkdGlobalVars.vars.mkdLogoAreaHeight + mkdGlobalVars.vars.mkdMenuAreaHeight; mkd.modules.header.stickyAppearAmount=stickyAppearAmount; var headerAppear=function(){ if(mkd.scroll < stickyAppearAmount){ mkd.modules.header.isStickyVisible=false; stickyHeader.removeClass('header-appear').find('.mkd-main-menu .second').removeClass('mkd-drop-down-start'); }else{ mkd.modules.header.isStickyVisible=true; stickyHeader.addClass('header-appear'); }}; headerAppear(); $(window).scroll(function(){ headerAppear(); }); break; case mkd.body.hasClass('mkd-fixed-on-scroll'): mkd.modules.header.behaviour='mkd-fixed-on-scroll'; var headerFixed=function(){ if(mkd.scroll < headerMenuAreaOffset){ fixedHeaderWrapper.removeClass('fixed'); header.css('margin-bottom',0);}else{ fixedHeaderWrapper.addClass('fixed'); header.css('margin-bottom',fixedHeaderWrapper.height()); }}; headerFixed(); $(window).scroll(function(){ headerFixed(); }); break; }} function mkdSideArea(){ var wrapper=$('.mkd-wrapper'), sideMenu=$('.mkd-side-menu'), sideMenuButtonOpen=$('a.mkd-side-menu-button-opener'), cssClass, slideFromRight=false, slideWithContent=false, slideUncovered=false; if(mkd.body.hasClass('mkd-side-menu-slide-from-right')){ cssClass='mkd-right-side-menu-opened'; wrapper.prepend('
'); slideFromRight=true; }else if(mkd.body.hasClass('mkd-side-menu-slide-with-content')){ cssClass='mkd-side-menu-open'; slideWithContent=true; }else if(mkd.body.hasClass('mkd-side-area-uncovered-from-content')){ cssClass='mkd-right-side-menu-opened'; slideUncovered=true; } $('a.mkd-side-menu-button-opener, a.mkd-close-side-menu').click(function(e){ e.preventDefault(); if(!sideMenuButtonOpen.hasClass('opened')){ sideMenuButtonOpen.addClass('opened'); mkd.body.addClass(cssClass); if(slideFromRight){ $('.mkd-wrapper .mkd-cover').click(function(){ mkd.body.removeClass('mkd-right-side-menu-opened'); sideMenuButtonOpen.removeClass('opened'); }); } if(slideUncovered){ sideMenu.css({ 'visibility':'visible' }); } var currentScroll=$(window).scrollTop(); $(window).scroll(function(){ if(Math.abs(mkd.scroll - currentScroll) > 400){ mkd.body.removeClass(cssClass); sideMenuButtonOpen.removeClass('opened'); if(slideUncovered){ var hideSideMenu=setTimeout(function(){ sideMenu.css({'visibility':'hidden'}); clearTimeout(hideSideMenu); },400); }} }); }else{ sideMenuButtonOpen.removeClass('opened'); mkd.body.removeClass(cssClass); if(slideUncovered){ var hideSideMenu=setTimeout(function(){ sideMenu.css({'visibility':'hidden'}); clearTimeout(hideSideMenu); },400); }} if(slideWithContent){ e.stopPropagation(); wrapper.click(function(){ e.preventDefault(); sideMenuButtonOpen.removeClass('opened'); mkd.body.removeClass('mkd-side-menu-open'); }); }}); } function mkdSideAreaScroll(){ var sideMenu=$('.mkd-side-menu'); if(sideMenu.length){ sideMenu.niceScroll({ scrollspeed: 60, mousescrollstep: 40, cursorwidth: 0, cursorborder: 0, cursorborderradius: 0, cursorcolor: "transparent", autohidemode: false, horizrailenabled: false }); }} function mkdInitMobileNavigation(){ var navigationOpener=$('.mkd-mobile-header .mkd-mobile-menu-opener'); var navigationHolder=$('.mkd-mobile-header .mkd-mobile-nav'); var dropdownOpener=$('.mkd-mobile-nav .mobile_arrow, .mkd-mobile-nav h4, .mkd-mobile-nav a[href*="#"]'); var animationSpeed=200; if(navigationOpener.length&&navigationHolder.length){ navigationOpener.on('tap click', function(e){ e.stopPropagation(); e.preventDefault(); if(navigationHolder.is(':visible')){ navigationOpener.removeClass('mkd-mobile-active'); navigationHolder.slideUp(animationSpeed); }else{ navigationOpener.addClass('mkd-mobile-active'); navigationHolder.slideDown(animationSpeed); }}); } if(dropdownOpener.length){ dropdownOpener.each(function(){ $(this).on('tap click', function(e){ var dropdownToOpen=$(this).nextAll('ul').first(); if(dropdownToOpen.length){ e.preventDefault(); e.stopPropagation(); var openerParent=$(this).parent('li'); if(dropdownToOpen.is(':visible')){ dropdownToOpen.slideUp(animationSpeed); openerParent.removeClass('mkd-opened'); }else{ dropdownToOpen.slideDown(animationSpeed); openerParent.addClass('mkd-opened'); }} }); }); } $('.mkd-mobile-nav a, .mkd-mobile-logo-wrapper a').on('click tap', function(){ if($(this).attr('href')!=='http://#'&&$(this).attr('href')!=='#'){ navigationHolder.slideUp(animationSpeed); }}); } function mkdMobileHeaderBehavior(){ if(mkd.body.hasClass('mkd-sticky-up-mobile-header')){ var stickyAppearAmount; var mobileHeader=$('.mkd-mobile-header'); var adminBar=$('#wpadminbar'); var mobileHeaderHeight=mobileHeader.length ? mobileHeader.height():0; var adminBarHeight=adminBar.length ? adminBar.height():0; var docYScroll1=$(document).scrollTop(); stickyAppearAmount=mobileHeaderHeight + adminBarHeight; $(window).scroll(function(){ var docYScroll2=$(document).scrollTop(); if(docYScroll2 > stickyAppearAmount){ mobileHeader.addClass('mkd-animate-mobile-header'); }else{ mobileHeader.removeClass('mkd-animate-mobile-header'); } if((docYScroll2 > docYScroll1&&docYScroll2 > stickyAppearAmount)||(docYScroll2 < stickyAppearAmount)){ mobileHeader.removeClass('mobile-header-appear'); mobileHeader.css('margin-bottom', 0); if(adminBar.length){ mobileHeader.find('.mkd-mobile-header-inner').css('top', 0); }}else{ mobileHeader.addClass('mobile-header-appear'); mobileHeader.css('margin-bottom', stickyAppearAmount); } docYScroll1=$(document).scrollTop(); }); }} function mkdSetDropDownMenuPosition(){ var menuItems=$(".mkd-drop-down > ul > li.narrow"); menuItems.each(function(){ var browserWidth=mkd.windowWidth-16; var menuItemPosition=$(this).offset().left; var dropdownMenuWidth=$(this).find('.second .inner ul').width(); var menuItemFromLeft=0; if(mkd.body.hasClass('boxed')){ menuItemFromLeft=mkd.boxedLayoutWidth - (menuItemPosition - (browserWidth - mkd.boxedLayoutWidth)/2); }else{ menuItemFromLeft=browserWidth - menuItemPosition; } var dropDownMenuFromLeft; if($(this).find('li.sub').length > 0){ dropDownMenuFromLeft=menuItemFromLeft - dropdownMenuWidth; } if(menuItemFromLeft < dropdownMenuWidth||dropDownMenuFromLeft < dropdownMenuWidth){ $(this).find('.second').addClass('right'); $(this).find('.second .inner ul').addClass('right'); }}); } function mkdDropDownMenu(){ var menu_items=$('.mkd-drop-down > ul > li'); menu_items.each(function(i){ if($(menu_items[i]).find('.second').length > 0){ var dropDownSecondDiv=$(menu_items[i]).find('.second'); if($(menu_items[i]).hasClass('wide')){ var dropdown=$(this).find('.inner > ul'); if(!$(this).hasClass('left_position')&&!$(this).hasClass('right_position')){ dropDownSecondDiv.css('left', 0); } var tallest=0; $(this).find('.second > .inner > ul > li').each(function(){ var thisHeight=$(this).height(); if(thisHeight > tallest){ tallest=thisHeight; }}); $(this).find('.second > .inner > ul > li').css("height", ""); $(this).find('.second > .inner > ul > li').height(tallest); } if(!mkd.menuDropdownHeightSet){ $(menu_items[i]).data('original_height', dropDownSecondDiv.height() + 'px'); dropDownSecondDiv.height(0); } if(navigator.userAgent.match(/(iPod|iPhone|iPad)/)){ $(menu_items[i]).on("touchstart mouseenter", function(){ dropDownSecondDiv.css({ 'height': $(menu_items[i]).data('original_height'), 'overflow': 'visible', 'visibility': 'visible', 'opacity': '1' }); }).on("mouseleave", function(){ dropDownSecondDiv.css({ 'height': '0px', 'overflow': 'hidden', 'visibility': 'hidden', 'opacity': '0' }); }); }else{ if(mkd.body.hasClass('mkd-dropdown-animate-height')){ $(menu_items[i]).mouseenter(function(){ dropDownSecondDiv.css({ 'visibility': 'visible', 'height': '0px', 'opacity': '1' }); dropDownSecondDiv.stop().animate({ 'height': $(menu_items[i]).data('original_height') }, 200, 'easeInSine' , function(){ dropDownSecondDiv.css('overflow', 'visible'); }); }).mouseleave(function(){ dropDownSecondDiv.stop().animate({ 'height': '0px' }, 0, function(){ dropDownSecondDiv.css({ 'overflow': 'hidden', 'visibility': 'hidden' }); }); }); }else{ var config={ interval: 0, over: function(){ setTimeout(function(){ dropDownSecondDiv.addClass('mkd-drop-down-start'); dropDownSecondDiv.stop().css({'height': $(menu_items[i]).data('original_height')}); }, 150); }, timeout: 150, out: function(){ dropDownSecondDiv.stop().css({'height': '0px'}); dropDownSecondDiv.removeClass('mkd-drop-down-start'); }}; $(menu_items[i]).hoverIntent(config); }} }}); $('.mkd-drop-down ul li.wide ul li a').on('click', function(e){ if(e.which==1){ var $this=$(this); setTimeout(function(){ $this.mouseleave(); }, 500); }}); mkd.menuDropdownHeightSet=true; } function mkdSearch(){ var searchOpener=$('a.mkd-search-opener'), searchClose, searchForm, touch=false; if($('html').hasClass('touch')){ touch=true; } if(searchOpener.length > 0){ if(mkd.body.hasClass('mkd-fullscreen-search')){ var fullscreenSearchFade=false, fullscreenSearchFromCircle=false; searchClose=$('.mkd-fullscreen-search-close'); if(mkd.body.hasClass('mkd-search-fade')){ fullscreenSearchFade=true; }else if(mkd.body.hasClass('mkd-search-from-circle')){ fullscreenSearchFromCircle=true; } mkdFullscreenSearch(fullscreenSearchFade, fullscreenSearchFromCircle); }else if(mkd.body.hasClass('mkd-search-slides-from-window-top')){ searchForm=$('.mkd-search-slide-window-top'); searchClose=$('.mkd-search-close'); mkdSearchWindowTop(); }else if(mkd.body.hasClass('mkd-search-slides-from-header-bottom')){ mkdSearchHeaderBottom(); }else if(mkd.body.hasClass('mkd-search-covers-header')){ mkdSearchCoversHeader(); } if(typeof searchOpener.data('hover-color')!=='undefined'){ var changeSearchColor=function(event){ event.data.searchOpener.css('color', event.data.color); }; var originalColor=searchOpener.css('color'); var hoverColor=searchOpener.data('hover-color'); searchOpener.on('mouseenter', { searchOpener: searchOpener, color: hoverColor }, changeSearchColor); searchOpener.on('mouseleave', { searchOpener: searchOpener, color: originalColor }, changeSearchColor); }} function mkdSearchWindowTop(){ searchOpener.click(function(e){ e.preventDefault(); var yPos; if($('.title').hasClass('has_parallax_background')){ yPos=parseInt($('.title.has_parallax_background').css('backgroundPosition').split(" ")[1]); }else{ yPos=0; } if(searchForm.height()=="0"){ $('.mkd-search-slide-window-top input[type="text"]').focus(); mkd.body.addClass('mkd-search-open'); $('.title.has_parallax_background').animate({ 'background-position-y': (yPos + 50)+'px' }, 150); }else{ mkd.body.removeClass('mkd-search-open'); $('.title.has_parallax_background').animate({ 'background-position-y': (yPos - 50)+'px' }, 150); } $(window).scroll(function(){ if(searchForm.height()!='0'&&mkd.scroll > 50){ mkd.body.removeClass('mkd-search-open'); $('.title.has_parallax_background').css('backgroundPosition', 'center '+(yPos)+'px'); }}); searchClose.click(function(e){ e.preventDefault(); mkd.body.removeClass('mkd-search-open'); $('.title.has_parallax_background').animate({ 'background-position-y': (yPos)+'px' }, 150); }); }); } function mkdSearchHeaderBottom(){ var searchInput=$('.mkd-search-slide-header-bottom input[type="submit"]'); searchOpener.click(function(e){ e.preventDefault(); if($(this).closest('.mkd-mobile-header').length > 0){ searchForm=$(this).closest('.mkd-mobile-header').children().children().first(); }else if($(this).closest('.mkd-sticky-header').length > 0){ searchForm=$(this).closest('.mkd-sticky-header').children().first(); }else{ searchForm=$('.mkd-search-slide-header-bottom').first(); } if(searchForm.hasClass('mkd-animated')){ searchForm.removeClass('mkd-animated'); }else{ searchForm.addClass('mkd-animated'); } searchForm.addClass('mkd-disabled'); searchInput.attr('disabled','mkd-disabled'); if(( $('.mkd-search-slide-header-bottom .mkd-search-field').val()!=='')&&($('.mkd-search-slide-header-bottom .mkd-search-field').val()!==' ')){ searchInput.removeAttr('mkd-disabled'); searchForm.removeClass('mkd-disabled'); }else{ searchForm.addClass('mkd-disabled'); searchInput.attr('disabled','mkd-disabled'); } $('.mkd-search-slide-header-bottom .mkd-search-field').keyup(function(){ if(($(this).val()!=='')&&($(this).val()!=' ')){ searchInput.removeAttr('mkd-disabled'); searchForm.removeClass('mkd-disabled'); }else{ searchInput.attr('disabled','mkd-disabled'); searchForm.addClass('mkd-disabled'); }}); $('.content, footer').click(function(e){ e.preventDefault(); searchForm.removeClass('mkd-animated'); }); }); if($('.mkd-search-submit').length){ $('.mkd-search-submit').click(function(e){ e.preventDefault(); e.stopPropagation(); searchForm.submit(); }); }} function mkdSearchCoversHeader(){ var searchFormSubmit=$('.mkd-search-submit'); searchOpener.click(function(e){ e.preventDefault(); var searchFormHeight, searchFormHolder=$('.mkd-search-cover .mkd-form-holder-outer'), searchForm, searchFormLandmark; searchForm=$(this).parents('.mkd-page-header').children('.mkd-menu-area').children('.mkd-grid').children().first(); searchFormLandmark=searchForm.parent(); if($(this).closest('.mkd-sticky-header').length > 0){ searchForm=$(this).closest('.mkd-sticky-header').children().first(); searchFormLandmark=searchForm.parent(); } if($(this).closest('.mkd-mobile-header').length > 0){ searchForm=$(this).closest('.mkd-mobile-header').children().children().first(); searchFormLandmark=searchForm.parent(); } if(searchFormLandmark.parent().hasClass('mkd-logo-area')){ searchFormHeight=mkdGlobalVars.vars.mkdLogoAreaHeight; }else if(searchFormLandmark.parent().hasClass('mkd-top-bar')){ searchFormHeight=mkdGlobalVars.vars.mkdTopBarHeight; }else if(searchFormLandmark.parent().hasClass('mkd-menu-area')){ searchFormHeight=mkdGlobalVars.vars.mkdMenuAreaHeight; }else if(searchFormLandmark.hasClass('mkd-sticky-header')){ searchFormHeight=mkdGlobalVars.vars.mkdStickyHeight; }else if(searchFormLandmark.parent().hasClass('mkd-mobile-header')){ searchFormHeight=$('.mkd-mobile-header-inner').height(); } searchFormHolder.height(searchFormHeight); searchForm.stop(true).fadeIn(600); $('.mkd-search-cover input[type="text"]').focus(); $('.mkd-search-close, .content, footer').click(function(e){ e.preventDefault(); searchForm.stop(true).fadeOut(450); }); searchForm.blur(function(){ searchForm.stop(true).fadeOut(450); }); }); if(searchFormSubmit.length){ searchFormSubmit.each(function(){ var searchFormSubmitThis=$(this); searchFormSubmitThis.click(function(e){ e.preventDefault(); e.stopPropagation(); searchFormSubmitThis.closest('.mkd-search-cover').submit(); }); }); }} function mkdFullscreenSearch(fade, fromCircle){ var searchHolder=$('.mkd-fullscreen-search-holder'), searchOverlay=$('.mkd-fullscreen-search-overlay'); searchOpener.click(function(e){ e.preventDefault(); var samePosition=false; if($(this).data('icon-close-same-position')==='yes'){ var closeTop=$(this).children().first().offset().top; var closeHeight=$(this).children().first().css('height'); var closeLeft=$(this).offset().left; samePosition=true; } if(fade){ if(searchHolder.hasClass('mkd-animate')){ mkd.body.removeClass('mkd-fullscreen-search-opened'); mkd.body.addClass('mkd-search-fade-out'); mkd.body.removeClass('mkd-search-fade-in'); searchHolder.removeClass('mkd-animate'); if(!mkd.body.hasClass('page-template-full_screen-php')){ mkd.modules.common.mkdEnableScroll(); }}else{ mkd.body.addClass('mkd-fullscreen-search-opened'); mkd.body.removeClass('mkd-search-fade-out'); mkd.body.addClass('mkd-search-fade-in'); searchHolder.addClass('mkd-animate'); if(samePosition){ searchClose.css({ 'top':closeTop - mkd.scroll, 'left':closeLeft, 'height': closeHeight, 'line-height': closeHeight }); } if(!mkd.body.hasClass('page-template-full_screen-php')){ mkd.modules.common.mkdDisableScroll(); }} searchClose.click(function(e){ e.preventDefault(); mkd.body.removeClass('mkd-fullscreen-search-opened'); searchHolder.removeClass('mkd-animate'); mkd.body.removeClass('mkd-search-fade-in'); mkd.body.addClass('mkd-search-fade-out'); if(!mkd.body.hasClass('page-template-full_screen-php')){ mkd.modules.common.mkdEnableScroll(); }}); $(document).keyup(function(e){ if(e.keyCode==27){ mkd.body.removeClass('mkd-fullscreen-search-opened'); searchHolder.removeClass('mkd-animate'); mkd.body.removeClass('mkd-search-fade-in'); mkd.body.addClass('mkd-search-fade-out'); if(!mkd.body.hasClass('page-template-full_screen-php')){ mkd.modules.common.mkdEnableScroll(); }} }); } if(fromCircle){ if(searchOverlay.hasClass('mkd-animate')){ searchOverlay.removeClass('mkd-animate'); searchHolder.css({ 'opacity': 0, 'display':'none' }); searchClose.css({ 'opacity':0, 'visibility':'hidden' }); searchOpener.css({ 'opacity': 1 }); }else{ searchOverlay.addClass('mkd-animate'); searchHolder.css({ 'display':'block' }); setTimeout(function(){ searchHolder.css('opacity','1'); searchClose.css({ 'opacity':1, 'visibility':'visible', 'top':closeTop - mkd.scroll, 'left':closeLeft }); if(samePosition){ searchClose.css({ 'top':closeTop - mkd.scroll, 'left':closeLeft }); } searchOpener.css({ 'opacity':0 }); },200); if(!mkd.body.hasClass('page-template-full_screen-php')){ mkd.modules.common.mkdDisableScroll(); }} searchClose.click(function(e){ e.preventDefault(); searchOverlay.removeClass('mkd-animate'); searchHolder.css({ 'opacity':0, 'display':'none' }); searchClose.css({ 'opacity':0, 'visibility':'hidden' }); searchOpener.css({ 'opacity':1 }); if(!mkd.body.hasClass('page-template-full_screen-php')){ mkd.modules.common.mkdEnableScroll(); }}); $(document).keyup(function(e){ if(e.keyCode==27){ searchOverlay.removeClass('mkd-animate'); searchHolder.css({ 'opacity':0, 'display':'none' }); searchClose.css({ 'opacity':0, 'visibility':'hidden' }); searchOpener.css({ 'opacity':1 }); if(!mkd.body.hasClass('page-template-full_screen-php')){ mkd.modules.common.mkdEnableScroll(); }} }); }}); $('.mkd-fullscreen-search-holder .mkd-search-field').focus(function(){ $('.mkd-fullscreen-search-holder .mkd-field-holder .mkd-line').css("width","100%"); }); $('.mkd-fullscreen-search-holder .mkd-search-field').blur(function(){ $('.mkd-fullscreen-search-holder .mkd-field-holder .mkd-line').css("width","0"); }); }} function mkdFollowHover(){ $('.mkd-main-menu').append(""); var itemHover=$('.mkd-item-hover'); var menu=$('.mkd-main-menu'); var menuItem=$('.mkd-main-menu > ul > li'); var currentMenuItem=menu.find('.current_page_item'); if(menuItem.hasClass('current_page_item')){ itemHover.css({width: currentMenuItem.find('.bottom-border-inner').width()}); itemHover.css({left: currentMenuItem.find('.bottom-border-inner').offset().left - menu.offset().left}); } itemHover.css({opacity:0}); menuItem.mouseenter(function(){ itemHover.css({width: $(this).find('.bottom-border-inner').width()}); itemHover.css({left: $(this).find('.bottom-border-inner').offset().left - $(this).parent().offset().left}); itemHover.animate({opacity:1},100); }); menu.mouseleave(function(){ itemHover.animate({opacity:0},250, 'easeOutSine'); }); }})(jQuery); (function($){ "use strict"; var title={}; mkd.modules.title=title; title.mkdParallaxTitle=mkdParallaxTitle; $(document).ready(function(){ mkdParallaxTitle(); mkdTitleAnimation(); }); $(window).load(function(){ }); $(window).resize(function(){ }); function mkdParallaxTitle(){ if($('.mkd-title.mkd-has-parallax-background').length > 0&&$('.touch').length===0){ var parallaxBackground=$('.mkd-title.mkd-has-parallax-background'); var parallaxBackgroundWithZoomOut=$('.mkd-title.mkd-has-parallax-background.mkd-zoom-out'); var backgroundSizeWidth=parseInt(parallaxBackground.data('background-width').match(/\d+/)); var titleHolderHeight=parallaxBackground.data('height'); var titleRate=(titleHolderHeight / 10000) * 7; var titleYPos=-(mkd.scroll * titleRate); parallaxBackground.css({'background-position': 'center '+ (titleYPos+mkdGlobalVars.vars.mkdAddForAdminBar) +'px' }); parallaxBackgroundWithZoomOut.css({'background-size': backgroundSizeWidth-mkd.scroll + 'px auto'}); $(window).scroll(function(){ titleYPos=-(mkd.scroll * titleRate); parallaxBackground.css({'background-position': 'center ' + (titleYPos+mkdGlobalVars.vars.mkdAddForAdminBar) + 'px' }); parallaxBackgroundWithZoomOut.css({'background-size': backgroundSizeWidth-mkd.scroll + 'px auto'}); }); }} function mkdTitleAnimation(){ if($('.mkd-title.mkd-title-animation').length > 0){ var titleArea=$('.mkd-title.mkd-title-animation'); $('.mkd-title.mkd-title-animation').waitForImages({ waitForAll: true, finished: function(){ titleArea.addClass('appeared'); }}); }} })(jQuery); (function($){ 'use strict'; var shortcodes={}; mkd.modules.shortcodes=shortcodes; shortcodes.mkdInitCounter=mkdInitCounter; shortcodes.mkdInitProgressBars=mkdInitProgressBars; shortcodes.mkdInitCountdown=mkdInitCountdown; shortcodes.mkdInitTestimonials=mkdInitTestimonials; shortcodes.mkdInitCarousels=mkdInitCarousels; shortcodes.mkdInitPieChart=mkdInitPieChart; shortcodes.mkdInitTabs=mkdInitTabs; shortcodes.mkdInitTabIcons=mkdInitTabIcons; shortcodes.mkdCustomFontResize=mkdCustomFontResize; shortcodes.mkdCounterResize=mkdCounterResize; shortcodes.mkdIconListResize=mkdIconListResize; shortcodes.mkdInitImageGallery=mkdInitImageGallery; shortcodes.mkdInitImageSlider=mkdInitImageSlider; shortcodes.mkdInitAccordions=mkdInitAccordions; shortcodes.mkdShowGoogleMap=mkdShowGoogleMap; shortcodes.mkdInitPortfolioListMasonry=mkdInitPortfolioListMasonry; shortcodes.mkdInitPortfolioListPinterest=mkdInitPortfolioListPinterest; shortcodes.mkdInitPortfolio=mkdInitPortfolio; shortcodes.mkdInitPortfolioMasonryFilter=mkdInitPortfolioMasonryFilter; shortcodes.mkdInitPortfolioSlider=mkdInitPortfolioSlider; shortcodes.mkdInitPortfolioLoadMore=mkdInitPortfolioLoadMore; shortcodes.mkdInitListAnimation=mkdInitListAnimation; shortcodes.mkdInitInteractiveImage=mkdInitInteractiveImage; shortcodes.mkdInitIconSeparator=mkdInitIconSeparator; shortcodes.mkdInitImageWithHoverInfo=mkdInitImageWithHoverInfo; shortcodes.mkdInitSocialHover=mkdInitSocialHover; shortcodes.mkdInitInteractiveIcon=mkdInitInteractiveIcon; shortcodes.mkdInitTeam=mkdInitTeam; shortcodes.mkdInitInteractiveBanner=mkdInitInteractiveBanner; shortcodes.mkdInitVideoBoxHolderAppear=mkdInitVideoBoxHolderAppear; shortcodes.mkdInitFullWidthSlider=mkdInitFullWidthSlider; $(document).ready(function(){ mkdInitCounter(); mkdInitProgressBars(); mkdInitCountdown(); mkdIcon().init(); mkdInitTestimonials(); mkdInitCarousels(); mkdInitPieChart(); mkdInitTabs(); mkdInitTabIcons(); mkdButton().init(); mkdCustomFontResize(); mkdCounterResize(); mkdIconListResize(); mkdInitImageGallery(); mkdInitImageSlider(); mkdInitAccordions(); mkdShowGoogleMap(); mkdInitPortfolioListMasonry(); mkdInitPortfolioListPinterest(); mkdInitPortfolio(); mkdInitPortfolioMasonryFilter(); mkdInitPortfolioSlider(); mkdInitPortfolioLoadMore(); mkdInitListAnimation(); mkdInitInteractiveImage(); mkdInitIconSeparator(); mkdInitImageWithHoverInfo(); mkdInitSocialHover(); mkdInitVideoBoxHolderAppear(); mkdInitFullWidthSlider(); }); $(window).resize(function(){ mkdCustomFontResize(); mkdCounterResize(); mkdIconListResize(); mkdInitPortfolioListMasonry(); mkdInitPortfolioListPinterest(); mkdInitImageWithHoverInfo(); mkdInitInteractiveIcon(); mkdInitTeam(); mkdInitInteractiveBanner(); }); $(window).load(function(){ mkdInitInteractiveIcon(); mkdInitTeam(); mkdInitInteractiveBanner(); }); function mkdInitCounter(){ var counters=$('.mkd-counter'); if(counters.length){ counters.each(function(){ var counter=$(this); counter.appear(function(){ counter.parents('.mkd-counter-holder').addClass('mkd-counter-holder-show'); if(counter.hasClass('zero')){ var max=parseFloat(counter.text()); counter.countTo({ from: 0, to: max, speed: 2000, refreshInterval: 100 }); }else{ counter.absoluteCounter({ speed: 2000, fadeInDelay: 1000 }); }},{accX: 0, accY: mkdGlobalVars.vars.mkdElementAppearAmount}); }); }} function mkdCounterResize(){ var counters=$('.mkd-counter-holder'); if(counters.length){ counters.each(function(){ var thisCounter=$(this); var thisCounterDigit=thisCounter.find('.mkd-counter'); var thisCounterCurrency=thisCounter.find('.mkd-counter-currency'); var fontSize; var coef1=1; var coef2=1; if(mkd.windowWidth <=1024){ coef1=0.8; coef2=0.88; } if(mkd.windowWidth < 600){ coef1=0.6; coef2=0.8; } if(mkd.windowWidth < 480){ coef1=0.4; coef2=0.6; } if(mkd.windowWidth < 320){ coef1=0.3; coef2=0.5; } if(typeof thisCounter.data('digit-size')!=='undefined'&&thisCounter.data('digit-size')!==false){ fontSize=parseInt(thisCounter.data('digit-size')); if(fontSize > 90){ fontSize=Math.round(fontSize*coef1); } else if(fontSize > 70){ fontSize=Math.round(fontSize*coef2); } thisCounterDigit.css('font-size',fontSize + 'px'); thisCounterCurrency.css('font-size',fontSize + 'px'); }}); }} function mkdIconListResize(){ var iconList=$('.mkd-icon-list-item'); if(iconList.length){ iconList.each(function(){ var thisIconItem=$(this); var thisItemIcon=thisIconItem.find('.mkd-icon-list-icon-holder-inner'); var thisItemText=thisIconItem.find('.mkd-icon-list-text'); var fontSizeIcon; var fontSizeText; var coef1=1; if(mkd.windowWidth <=1024){ coef1=0.75; } if(mkd.windowWidth < 600){ coef1=0.65; } if(mkd.windowWidth < 480){ coef1=0.5; } if(typeof thisItemIcon.data('icon-size')!=='undefined'&&thisItemIcon.data('icon-size')!==false){ fontSizeIcon=parseInt(thisItemIcon.data('icon-size')); if(fontSizeIcon > 50){ fontSizeIcon=Math.round(fontSizeIcon*coef1); } thisItemIcon.children().css('font-size',fontSizeIcon + 'px'); } if(typeof thisItemText.data('title-size')!=='undefined'&&thisItemText.data('title-size')!==false){ fontSizeText=parseInt(thisItemText.data('title-size')); if(fontSizeText > 50){ fontSizeText=Math.round(fontSizeText*coef1); } thisItemText.css('font-size',fontSizeText + 'px'); }}); }} function mkdInitProgressBars(){ var progressBar=$('.mkd-progress-bar'); if(progressBar.length){ progressBar.each(function(){ var thisBar=$(this); thisBar.appear(function(){ mkdInitToCounterProgressBar(thisBar); if(thisBar.find('.mkd-floating.mkd-floating-inside')!==0){ var floatingInsideMargin=thisBar.find('.mkd-progress-content').height(); floatingInsideMargin +=parseFloat(thisBar.find('.mkd-progress-title-holder').css('padding-bottom')); floatingInsideMargin +=parseFloat(thisBar.find('.mkd-progress-title-holder').css('margin-bottom')); thisBar.find('.mkd-floating-inside').css('margin-bottom',-(floatingInsideMargin)+'px'); } var percentage=thisBar.find('.mkd-progress-content').data('percentage'), progressContent=thisBar.find('.mkd-progress-content'), progressNumber=thisBar.find('.mkd-progress-number'); progressContent.css('width', '0%'); progressContent.animate({'width': percentage+'%'}, 1500); progressNumber.css('right', '0%'); progressNumber.animate({'right': percentage+'%'}, 1500); }); }); }} function mkdInitToCounterProgressBar(progressBar){ var percentage=parseFloat(progressBar.find('.mkd-progress-content').data('percentage')); var percent=progressBar.find('.mkd-progress-number .mkd-percent'); if(percent.length){ percent.each(function(){ var thisPercent=$(this); thisPercent.parents('.mkd-progress-number-wrapper').css('opacity', '1'); thisPercent.countTo({ from: 0, to: percentage, speed: 1500, refreshInterval: 50 }); }); }} function mkdInitCountdown(){ var countdowns=$('.mkd-countdown'), year, month, day, hour, minute, timezone, monthLabel, dayLabel, hourLabel, minuteLabel, secondLabel, monthLabelSingle, dayLabelSingle, hourLabelSingle, minuteLabelSingle, secondLabelSingle; if(countdowns.length){ countdowns.each(function(){ var countdownId=$(this).attr('id'), countdown=$('#'+countdownId), digitFontSize, labelFontSize; year=countdown.data('year'); month=countdown.data('month'); day=countdown.data('day'); hour=countdown.data('hour'); minute=countdown.data('minute'); timezone=countdown.data('timezone'); monthLabel=countdown.data('month-label'); dayLabel=countdown.data('day-label'); hourLabel=countdown.data('hour-label'); minuteLabel=countdown.data('minute-label'); secondLabel=countdown.data('second-label'); monthLabelSingle=countdown.data('month-label-single'); dayLabelSingle=countdown.data('day-label-single'); hourLabelSingle=countdown.data('hour-label-single'); minuteLabelSingle=countdown.data('minute-label-single'); secondLabelSingle=countdown.data('second-label-single'); digitFontSize=countdown.data('digit-size'); labelFontSize=countdown.data('label-size'); countdown.countdown({ until: new Date(year, month - 1, day, hour, minute, 44), labels: ['Years', monthLabel, 'Weeks', dayLabel, hourLabel, minuteLabel, secondLabel], labels1: ['Years', monthLabelSingle, 'Weeks', dayLabelSingle, hourLabelSingle, minuteLabelSingle, secondLabelSingle], format: 'ODHMS', timezone: timezone, padZeroes: true, onTick: setCountdownStyle }); function setCountdownStyle(){ countdown.find('.countdown-amount').css({ 'font-size':digitFontSize+'px', 'line-height':digitFontSize+'px' }); countdown.find('.countdown-period').css({ 'font-size':labelFontSize+'px' }); }}); }} var mkdIcon=mkd.modules.shortcodes.mkdIcon=function(){ var icons=$('.mkd-icon-shortcode'); var iconAnimation=function(icon){ if(icon.hasClass('mkd-icon-animation')){ icon.appear(function(){ icon.parent('.mkd-icon-animation-holder').addClass('mkd-icon-animation-show'); }, {accX: 0, accY: mkdGlobalVars.vars.mkdElementAppearAmount}); }}; var iconHoverColor=function(icon){ if(typeof icon.data('hover-color')!=='undefined'){ var changeIconColor=function(event){ event.data.icon.css('color', event.data.color); }; var iconElement=icon.find('.mkd-icon-element'); var hoverColor=icon.data('hover-color'); var originalColor=iconElement.css('color'); if(hoverColor!==''){ icon.on('mouseenter', {icon: iconElement, color: hoverColor}, changeIconColor); icon.on('mouseleave', {icon: iconElement, color: originalColor}, changeIconColor); }} }; var iconHolderBackgroundHover=function(icon){ if(typeof icon.data('hover-background-color')!=='undefined'){ var changeIconBgColor=function(event){ event.data.icon.css('background-color', event.data.color); }; var hoverBackgroundColor=icon.data('hover-background-color'); var originalBackgroundColor=icon.find('.mkd-background').css('background-color'); if(hoverBackgroundColor!==''){ icon.on('mouseenter', {icon: icon.find('.mkd-background'), color: hoverBackgroundColor}, changeIconBgColor); icon.on('mouseleave', {icon: icon.find('.mkd-background'), color: originalBackgroundColor}, changeIconBgColor); }} }; var iconHolderBorderHover=function(icon){ if(typeof icon.data('hover-border-color')!=='undefined'){ var changeIconBorder=function(event){ event.data.icon.css('border-color', event.data.color); }; var hoverBorderColor=icon.data('hover-border-color'); var originalBorderColor=icon.find('.mkd-background').css('borderTopColor'); if(hoverBorderColor!==''){ icon.on('mouseenter', {icon: icon.find('.mkd-background'), color: hoverBorderColor}, changeIconBorder); icon.on('mouseleave', {icon: icon.find('.mkd-background'), color: originalBorderColor}, changeIconBorder); }} }; return { init: function(){ if(icons.length){ icons.each(function(){ iconAnimation($(this)); iconHoverColor($(this)); iconHolderBackgroundHover($(this)); iconHolderBorderHover($(this)); }); }} };}; function mkdInitTestimonials(){ var testimonial=$('.mkd-testimonials'); if(testimonial.length){ testimonial.each(function(){ var thisTestimonial=$(this); var sliderItem=$(this).find('.mkd-testimonial-content'); for(var i=0; i < sliderItem.length; i+=3){ sliderItem.slice(i, i+3).wrapAll("
"); } thisTestimonial.waitForImages(function(){ $(this).animate({opacity:1},1000); }); thisTestimonial.appear(function(){ thisTestimonial.css('visibility','visible'); },{accX: 0, accY: mkdGlobalVars.vars.mkdElementAppearAmount}); var interval=5000; var items=[ [0,1], [480,1], [1024,1] ]; thisTestimonial.owlCarousel({ items: 1, itemsCustom: items, autoPlay: interval, addClassActive: true, transitionStyle:'mkdTransition', autoHeight: true, paginationSpeed: 500 }); }); }} function mkdInitCarousels(){ var carouselHolders=$('.mkd-carousel-holder'), carousel; if(carouselHolders.length){ carouselHolders.each(function(){ var pagination=true; var autoplay=4000; var items=[ [0,1], [480,2], [768,3] ]; var carouselHolder=$(this); carousel=carouselHolder.children('.mkd-carousel'); var sliderItem=$(this).find('.mkd-carousel-item-holder'); if(carousel.hasClass('mkd-carousel-grid')){ for(var i=0; i < sliderItem.length; i+=2){ sliderItem.slice(i, i+2).wrapAll("
"); }}else{ sliderItem.wrap("
"); pagination=false; var itemsNumber=6; if(typeof carousel.data('items-shown')!=='undefined'){ itemsNumber=parseInt(carousel.data('items-shown')); } items=[ [0,1], [480,2], [768,4], [1024,itemsNumber] ]; } if(carousel.data('autoplay')=='no'){ autoplay=false; } carouselHolder.waitForImages(function(){ $(this).animate({opacity:1},2200); }); carousel.owlCarousel({ autoPlay: autoplay, items: 3, itemsCustom: items, addClassActive: true, pagination: pagination, navigation: false, paginationSpeed: 400 }); }); }} function mkdInitPieChart(){ var pieCharts=$('.mkd-pie-chart-holder, .mkd-pie-chart-with-icon-holder'); if(pieCharts.length){ pieCharts.each(function (){ var pieChart=$(this), percentageHolder=pieChart.children('.mkd-percentage, .mkd-percentage-with-icon'), barColor=mkdGlobalVars.vars.mkdFirstMainColor, trackColor='#efefef', lineWidth=10, size=142; percentageHolder.appear(function(){ initToCounterPieChart(pieChart); percentageHolder.css('opacity', '1'); percentageHolder.easyPieChart({ barColor: barColor, trackColor: trackColor, scaleColor: false, lineCap: 'butt', lineWidth: lineWidth, animate: 1500, size: size }); },{accX: 0, accY: mkdGlobalVars.vars.mkdElementAppearAmount}); }); }} function initToCounterPieChart(pieChart){ pieChart.css('opacity', '1'); var counter=pieChart.find('.mkd-to-counter'), max=parseFloat(counter.text()); counter.countTo({ from: 0, to: max, speed: 1500, refreshInterval: 50 }); } function mkdInitTabs(){ var tabs=$('.mkd-tabs'); if(tabs.length){ tabs.each(function(){ var thisTabs=$(this), navLinks=thisTabs.find('.mkd-tabs-nav a'); navLinks.each(function (){ var that=$(this), link=that.attr('href'), container=$(link), linkSub=link.substr(1, link.length - 1), customID=Math.floor(Math.random() * 10000); if(container.length){ container.attr({ 'id':linkSub + customID }); that.attr({ 'href':link + customID }); }}); if(thisTabs.hasClass('mkd-horizontal')){ thisTabs.tabs(); } else if(thisTabs.hasClass('mkd-vertical')){ thisTabs.tabs().addClass('ui-tabs-vertical ui-helper-clearfix'); thisTabs.find('.mkd-tabs-nav > ul >li').removeClass('ui-corner-top').addClass('ui-corner-left'); }}); }} function mkdInitTabIcons(){ var tabContent=$('.mkd-tab-container'); if(tabContent.length){ tabContent.each(function(){ var thisTabContent=$(this); var id=thisTabContent.attr('id'); var icon=''; if(typeof thisTabContent.data('icon-html')!=='undefined'||thisTabContent.data('icon-html')!=='false'){ icon=thisTabContent.data('icon-html'); } var tabNav=thisTabContent.parents('.mkd-tabs').find('.mkd-tabs-nav > li > a[href=#'+id+']'); if(typeof(tabNav)!=='undefined'){ tabNav.children('.mkd-icon-frame').append(icon); }}); }} var mkdButton=mkd.modules.shortcodes.mkdButton=function(){ var buttons=$('.mkd-btn'); var buttonHoverColor=function(button){ if(typeof button.data('hover-color')!=='undefined'){ var changeButtonColor=function(event){ event.data.button.css('color', event.data.color); }; var originalColor=button.css('color'); var hoverColor=button.data('hover-color'); button.on('mouseenter', { button: button, color: hoverColor }, changeButtonColor); button.on('mouseleave', { button: button, color: originalColor }, changeButtonColor); }}; var buttonHoverBgColor=function(button){ if(typeof button.data('hover-bg-color')!=='undefined'){ var changeButtonBg=function(event){ event.data.button.css('background-color', event.data.color); }; var originalBgColor=button.css('background-color'); var hoverBgColor=button.data('hover-bg-color'); button.on('mouseenter', { button: button, color: hoverBgColor }, changeButtonBg); button.on('mouseleave', { button: button, color: originalBgColor }, changeButtonBg); }}; var buttonHoverBorderColor=function(button){ if(typeof button.data('hover-border-color')!=='undefined'){ var changeBorderColor=function(event){ event.data.button.css('border-color', event.data.color); }; var originalBorderColor=button.css('borderTopColor'); var hoverBorderColor=button.data('hover-border-color'); button.on('mouseenter', { button: button, color: hoverBorderColor }, changeBorderColor); button.on('mouseleave', { button: button, color: originalBorderColor }, changeBorderColor); }}; var buttonIconHoverBorderColor=function(button){ if(button.hasClass('mkd-btn-icon')){ if(typeof button.data('between-hover-border-color')!=='undefined'){ var changeIconBorderColor=function(event){ event.data.iconHolder.css('border-color', event.data.color); }; var iconHolder=button.find('.mkd-btn-text'); var originalBorderColor=iconHolder.css('borderRightColor'); var hoverBorderColor=button.data('between-hover-border-color'); button.on('mouseenter', { iconHolder: iconHolder, color: hoverBorderColor }, changeIconBorderColor); button.on('mouseleave', { iconHolder: iconHolder, color: originalBorderColor }, changeIconBorderColor); }} }; return { init: function(){ if(buttons.length){ buttons.each(function(){ buttonHoverColor($(this)); buttonHoverBgColor($(this)); buttonHoverBorderColor($(this)); buttonIconHoverBorderColor($(this)); }); }} };}; function mkdCustomFontResize(){ var customFont=$('.mkd-custom-font-holder'); if(customFont.length){ customFont.each(function(){ var thisCustomFont=$(this); var fontSize; var lineHeight; var coef1=1; var coef2=1; if(mkd.windowWidth < 1200){ coef1=0.8; } if(mkd.windowWidth < 1000){ coef1=0.7; } if(mkd.windowWidth < 768){ coef1=0.6; coef2=0.7; } if(mkd.windowWidth < 600){ coef1=0.5; coef2=0.6; } if(mkd.windowWidth < 480){ coef1=0.4; coef2=0.5; } if(typeof thisCustomFont.data('font-size')!=='undefined'&&thisCustomFont.data('font-size')!==false){ fontSize=parseInt(thisCustomFont.data('font-size')); if(fontSize > 70){ fontSize=Math.round(fontSize*coef1); } else if(fontSize > 35){ fontSize=Math.round(fontSize*coef2); } thisCustomFont.css('font-size',fontSize + 'px'); } if(typeof thisCustomFont.data('line-height')!=='undefined'&&thisCustomFont.data('line-height')!==false){ lineHeight=parseInt(thisCustomFont.data('line-height')); if(lineHeight > 70&&mkd.windowWidth < 1200){ lineHeight='1.2em'; } else if(lineHeight > 35&&mkd.windowWidth < 768){ lineHeight='1.2em'; }else{ lineHeight +='px'; } thisCustomFont.css('line-height', lineHeight); }}); }} function mkdShowGoogleMap(){ if($('.mkd-google-map').length){ $('.mkd-google-map').each(function(){ var element=$(this); var customMapStyle; if(typeof element.data('custom-map-style')!=='undefined'){ customMapStyle=element.data('custom-map-style'); } var colorOverlay; if(typeof element.data('color-overlay')!=='undefined'&&element.data('color-overlay')!==false){ colorOverlay=element.data('color-overlay'); } var saturation; if(typeof element.data('saturation')!=='undefined'&&element.data('saturation')!==false){ saturation=element.data('saturation'); } var lightness; if(typeof element.data('lightness')!=='undefined'&&element.data('lightness')!==false){ lightness=element.data('lightness'); } var zoom; if(typeof element.data('zoom')!=='undefined'&&element.data('zoom')!==false){ zoom=element.data('zoom'); } var pin; if(typeof element.data('pin')!=='undefined'&&element.data('pin')!==false){ pin=element.data('pin'); } var mapHeight; if(typeof element.data('height')!=='undefined'&&element.data('height')!==false){ mapHeight=element.data('height'); } var uniqueId; if(typeof element.data('unique-id')!=='undefined'&&element.data('unique-id')!==false){ uniqueId=element.data('unique-id'); } var scrollWheel; if(typeof element.data('scroll-wheel')!=='undefined'){ scrollWheel=element.data('scroll-wheel'); } var addresses; if(typeof element.data('addresses')!=='undefined'&&element.data('addresses')!==false){ addresses=element.data('addresses'); } var map="map_"+ uniqueId; var geocoder="geocoder_"+ uniqueId; var holderId="mkd-map-"+ uniqueId; mkdInitializeGoogleMap(customMapStyle, colorOverlay, saturation, lightness, scrollWheel, zoom, holderId, mapHeight, pin, map, geocoder, addresses); }); }} function mkdInitializeGoogleMap(customMapStyle, color, saturation, lightness, wheel, zoom, holderId, height, pin, map, geocoder, data){ var mapStyles=[ { stylers: [ {hue: color }, {saturation: saturation}, {lightness: lightness}, {gamma: 1} ] } ]; var googleMapStyleId; if(customMapStyle){ googleMapStyleId='mkd-style'; }else{ googleMapStyleId=google.maps.MapTypeId.ROADMAP; } var qoogleMapType=new google.maps.StyledMapType(mapStyles, {name: "Mkd Google Map"}); geocoder=new google.maps.Geocoder(); var latlng=new google.maps.LatLng(-34.397, 150.644); if(!isNaN(height)){ height=height + 'px'; } var myOptions={ zoom: zoom, scrollwheel: wheel, center: latlng, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL, position: google.maps.ControlPosition.RIGHT_CENTER }, scaleControl: false, scaleControlOptions: { position: google.maps.ControlPosition.LEFT_CENTER }, streetViewControl: false, streetViewControlOptions: { position: google.maps.ControlPosition.LEFT_CENTER }, panControl: false, panControlOptions: { position: google.maps.ControlPosition.LEFT_CENTER }, mapTypeControl: false, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'mkd-style'], style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, position: google.maps.ControlPosition.LEFT_CENTER }, mapTypeId: googleMapStyleId }; map=new google.maps.Map(document.getElementById(holderId), myOptions); map.mapTypes.set('mkd-style', qoogleMapType); var index; for (index=0; index < data.length; ++index){ mkdInitializeGoogleAddress(data[index], pin, map, geocoder); } var holderElement=document.getElementById(holderId); holderElement.style.height=height; } function mkdInitializeGoogleAddress(data, pin, map, geocoder){ if(data==='') return; var contentString='
'+ '
'+ '
'+ '
'+ '

'+data+'

'+ '
'+ '
'; var infowindow=new google.maps.InfoWindow({ content: contentString }); geocoder.geocode({ 'address': data}, function(results, status){ if(status===google.maps.GeocoderStatus.OK){ map.setCenter(results[0].geometry.location); var marker=new google.maps.Marker({ map: map, position: results[0].geometry.location, icon: pin, title: data['store_title'] }); google.maps.event.addListener(marker, 'click', function(){ infowindow.open(map,marker); }); google.maps.event.addDomListener(window, 'resize', function(){ map.setCenter(results[0].geometry.location); }); }}); } function mkdInitAccordions(){ var accordion=$('.mkd-accordion-holder'); if(accordion.length){ accordion.each(function(){ var thisAccordion=$(this); if(thisAccordion.hasClass('mkd-accordion')){ thisAccordion.accordion({ animate: "swing", collapsible: true, active: 0, icons: "", heightStyle: "content" }); } if(thisAccordion.hasClass('mkd-toggle')){ var toggleAccordion=$(this); var toggleAccordionTitle=toggleAccordion.find('.mkd-title-holder'); var toggleAccordionContent=toggleAccordionTitle.next(); toggleAccordion.addClass("accordion ui-accordion ui-accordion-icons ui-widget ui-helper-reset"); toggleAccordionTitle.addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom"); toggleAccordionContent.addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(); toggleAccordionTitle.each(function(){ var thisTitle=$(this); thisTitle.hover(function(){ thisTitle.toggleClass("ui-state-hover"); }); thisTitle.on('click',function(){ thisTitle.toggleClass('ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom'); thisTitle.next().toggleClass('ui-accordion-content-active').slideToggle(400); }); }); }}); }} function mkdInitImageGallery(){ var galleries=$('.mkd-image-gallery'); if(galleries.length){ galleries.each(function (){ var gallery=$(this).children('.mkd-image-gallery-slider'), autoplay=gallery.data('autoplay'), animation=(gallery.data('animation')=='slide') ? false:gallery.data('animation'), navigation=(gallery.data('navigation')=='yes'), pagination=(gallery.data('pagination')=='yes'); gallery.owlCarousel({ singleItem: true, autoPlay: autoplay * 1000, navigation: navigation, transitionStyle:animation, autoHeight: true, pagination: pagination, slideSpeed: 600, navigationText: [ '', '' ] }); }); }} function mkdInitPortfolio(){ var portList=$('.mkd-portfolio-list-holder-outer.mkd-ptf-standard, .mkd-portfolio-list-holder-outer.mkd-ptf-gallery'); if(portList.length){ portList.each(function(){ var thisPortList=$(this); thisPortList.appear(function(){ mkdInitPortMixItUp(thisPortList); }); }); }} function mkdInitPortMixItUp(container){ var filterClass=''; if(container.hasClass('mkd-ptf-has-filter')){ filterClass=container.find('.mkd-portfolio-filter-holder-inner ul li').data('class'); filterClass='.'+filterClass; } var holderInner=container.find('.mkd-portfolio-list-holder'); holderInner.mixItUp({ callbacks: { onMixLoad: function(){ holderInner.find('article').css('visibility','visible'); }, onMixStart: function(){ holderInner.find('article').css('visibility','visible'); }, onMixBusy: function(){ holderInner.find('article').css('visibility','visible'); }}, selectors: { filter: filterClass }, animation: { effects: 'fade scale', duration: 300, easing: 'ease-out' }}); } function mkdInitPortfolioListMasonry(){ var portList=$('.mkd-portfolio-list-holder-outer.mkd-ptf-masonry'); if(portList.length){ portList.each(function(){ var thisPortList=$(this).children('.mkd-portfolio-list-holder'); var size=thisPortList.find('.mkd-portfolio-list-masonry-grid-sizer').width(); mkdResizeMasonry(size,thisPortList); mkdInitMasonry(thisPortList); $(window).resize(function(){ mkdResizeMasonry(size,thisPortList); mkdInitMasonry(thisPortList); }); }); }} function mkdInitMasonry(container){ container.animate({opacity: 1}); container.isotope({ itemSelector: '.mkd-portfolio-item', masonry: { columnWidth: '.mkd-portfolio-list-masonry-grid-sizer' }}); } function mkdResizeMasonry(size,container){ var defaultMasonryItem=container.find('.mkd-default-masonry-item'); var largeWidthMasonryItem=container.find('.mkd-large-width-masonry-item'); var largeHeightMasonryItem=container.find('.mkd-large-height-masonry-item'); var largeWidthHeightMasonryItem=container.find('.mkd-large-width-height-masonry-item'); defaultMasonryItem.css('height', size); largeWidthMasonryItem.css('height', size); if(mkd.windowWidth > 600){ largeWidthHeightMasonryItem.css('height', Math.round(2*size)); largeHeightMasonryItem.css('height', Math.round(2*size)); }else{ largeWidthHeightMasonryItem.css('height', size); largeHeightMasonryItem.css('height', size); }} function mkdInitPortfolioListPinterest(){ var portList=$('.mkd-portfolio-list-holder-outer.mkd-ptf-pinterest'); if(portList.length){ portList.each(function(){ var thisPortList=$(this).children('.mkd-portfolio-list-holder'); mkdInitPinterest(thisPortList); $(window).resize(function(){ mkdInitPinterest(thisPortList); }); }); }} function mkdInitPinterest(container){ container.animate({opacity: 1}); container.isotope({ itemSelector: '.mkd-portfolio-item', masonry: { columnWidth: '.mkd-portfolio-list-masonry-grid-sizer' }}); } function mkdInitPortfolioMasonryFilter(){ var filterHolder=$('.mkd-portfolio-filter-holder.mkd-masonry-filter'); if(filterHolder.length){ filterHolder.each(function(){ var thisFilterHolder=$(this); var portfolioIsotopeAnimation=null; var filter=thisFilterHolder.find('ul li').data('class'); thisFilterHolder.find('.filter:first').addClass('current'); thisFilterHolder.find('.filter').click(function(){ var currentFilter=$(this); clearTimeout(portfolioIsotopeAnimation); $('.isotope, .isotope .isotope-item').css('transition-duration','0.8s'); portfolioIsotopeAnimation=setTimeout(function(){ $('.isotope, .isotope .isotope-item').css('transition-duration','0s'); },700); var selector=$(this).attr('data-filter'); thisFilterHolder.siblings('.mkd-portfolio-list-holder-outer').find('.mkd-portfolio-list-holder').isotope({ filter: selector }); thisFilterHolder.find('.filter').removeClass('current'); currentFilter.addClass('current'); return false; }); }); }} function mkdInitPortfolioSlider(){ var portSlider=$('.mkd-portfolio-list-holder-outer.mkd-portfolio-slider-holder'); if(portSlider.length){ portSlider.each(function(){ var thisPortSlider=$(this); var sliderWrapper=thisPortSlider.children('.mkd-portfolio-list-holder'); var numberOfItems=thisPortSlider.data('items'); var navigation=true; var items=[ [0,1], [480,2], [768,3], [1024,numberOfItems] ]; sliderWrapper.owlCarousel({ autoPlay: 5000, items: numberOfItems, itemsCustom: items, pagination: true, navigation: navigation, slideSpeed: 600, transitionStyle:'fade', navigationText: [ '', '' ] }); }); }} function mkdInitPortfolioLoadMore(){ var portList=$('.mkd-portfolio-list-holder-outer.mkd-ptf-load-more'); if(portList.length){ portList.each(function(){ var thisPortList=$(this); var thisPortListInner=thisPortList.find('.mkd-portfolio-list-holder'); var nextPage; var maxNumPages; var loadMoreButton=thisPortList.find('.mkd-ptf-list-load-more a'); if(typeof thisPortList.data('max-num-pages')!=='undefined'&&thisPortList.data('max-num-pages')!==false){ maxNumPages=thisPortList.data('max-num-pages'); } loadMoreButton.on('click', function (e){ var loadMoreDatta=mkdGetPortfolioAjaxData(thisPortList); nextPage=loadMoreDatta.nextPage; e.preventDefault(); e.stopPropagation(); if(nextPage <=maxNumPages){ var ajaxData=mkdSetPortfolioAjaxData(loadMoreDatta); $.ajax({ type: 'POST', data: ajaxData, url: mkdCoreAjaxUrl, success: function (data){ nextPage++; thisPortList.data('next-page', nextPage); var response=$.parseJSON(data); var responseHtml=mkdConvertHTML(response.html); thisPortList.waitForImages(function(){ setTimeout(function(){ if(thisPortList.hasClass('mkd-ptf-masonry')||thisPortList.hasClass('mkd-ptf-pinterest')){ thisPortListInner.isotope().append(responseHtml).isotope('appended', responseHtml).isotope('reloadItems'); }else{ thisPortListInner.mixItUp('append',responseHtml); }},400); }); }}); } if(nextPage===maxNumPages){ loadMoreButton.hide(); }}); }); }} function mkdConvertHTML(html){ var newHtml=$.trim(html), $html=$(newHtml), $empty=$(); $html.each(function(index, value){ if(value.nodeType===1){ $empty=$empty.add(this); }}); return $empty; } function mkdGetPortfolioAjaxData(container){ var returnValue={}; returnValue.type=''; returnValue.columns=''; returnValue.gridSize=''; returnValue.orderBy=''; returnValue.order=''; returnValue.number=''; returnValue.imageSize=''; returnValue.filter=''; returnValue.filterOrderBy=''; returnValue.category=''; returnValue.selectedProjectes=''; returnValue.showLoadMore=''; returnValue.titleTag=''; returnValue.nextPage=''; returnValue.maxNumPages=''; if(typeof container.data('type')!=='undefined'&&container.data('type')!==false){ returnValue.type=container.data('type'); } if(typeof container.data('grid-size')!=='undefined'&&container.data('grid-size')!==false){ returnValue.gridSize=container.data('grid-size'); } if(typeof container.data('columns')!=='undefined'&&container.data('columns')!==false){ returnValue.columns=container.data('columns'); } if(typeof container.data('order-by')!=='undefined'&&container.data('order-by')!==false){ returnValue.orderBy=container.data('order-by'); } if(typeof container.data('order')!=='undefined'&&container.data('order')!==false){ returnValue.order=container.data('order'); } if(typeof container.data('number')!=='undefined'&&container.data('number')!==false){ returnValue.number=container.data('number'); } if(typeof container.data('image-size')!=='undefined'&&container.data('image-size')!==false){ returnValue.imageSize=container.data('image-size'); } if(typeof container.data('filter')!=='undefined'&&container.data('filter')!==false){ returnValue.filter=container.data('filter'); } if(typeof container.data('filter-order-by')!=='undefined'&&container.data('filter-order-by')!==false){ returnValue.filterOrderBy=container.data('filter-order-by'); } if(typeof container.data('category')!=='undefined'&&container.data('category')!==false){ returnValue.category=container.data('category'); } if(typeof container.data('selected-projects')!=='undefined'&&container.data('selected-projects')!==false){ returnValue.selectedProjectes=container.data('selected-projects'); } if(typeof container.data('show-load-more')!=='undefined'&&container.data('show-load-more')!==false){ returnValue.showLoadMore=container.data('show-load-more'); } if(typeof container.data('title-tag')!=='undefined'&&container.data('title-tag')!==false){ returnValue.titleTag=container.data('title-tag'); } if(typeof container.data('next-page')!=='undefined'&&container.data('next-page')!==false){ returnValue.nextPage=container.data('next-page'); } if(typeof container.data('max-num-pages')!=='undefined'&&container.data('max-num-pages')!==false){ returnValue.maxNumPages=container.data('max-num-pages'); } return returnValue; } function mkdSetPortfolioAjaxData(container){ var returnValue={ action: 'mkd_core_portfolio_ajax_load_more', type: container.type, columns: container.columns, gridSize: container.gridSize, orderBy: container.orderBy, order: container.order, number: container.number, imageSize: container.imageSize, filter: container.filter, filterOrderBy: container.filterOrderBy, category: container.category, selectedProjectes: container.selectedProjectes, showLoadMore: container.showLoadMore, titleTag: container.titleTag, nextPage: container.nextPage }; return returnValue; } function mkdInitListAnimation(){ var animateList=$('.mkd-animate-list'); var animateOnTouch=$('.mkd-no-animations-on-touch'); if(animateList.length&&!animateOnTouch.length){ animateList.each(function(){ var thisList=$(this); var thisListLis=thisList.find("li"); thisList.appear(function(){ thisListLis.each(function (l){ var k=$(this); setTimeout(function (){ k.animate({ opacity: 1, top: 0 }, 200); }, 220*l); }); },{accX: 0, accY: mkdGlobalVars.vars.mkdElementAppearAmount}); }); }} function mkdInitImageSlider(){ if($('.mkd-image-slider').length){ $('.mkd-image-slider').each(function(){ var imageSlider=$(this); var animation=''; var thumbs=''; var navigation=''; var customNavigation=''; var navigationArrows=imageSlider.find(".mkd-slider-navigation a"); if($(this).hasClass('with-thumbs')){ thumbs="thumbnails"; navigation=false; customNavigation=false; animation='slide'; }else{ thumbs=false; navigation=true; customNavigation=navigationArrows; animation='fade'; } imageSlider.waitForImages(function(){ $(this).animate({opacity:1},2200); }); imageSlider.find('.flexslider').flexslider({ animation: animation, controlNav: thumbs, directionNav: navigation, customDirectionNav: customNavigation, animationLoop: false, start: function(slider){ slider.find('.flex-control-nav .flex-active').parent('li').addClass('active-item').siblings().removeClass('active-item'); mkd.modules.common.mkdInitParallax(); }, after: function(slider){ slider.find('.flex-control-nav .flex-active').parent('li').addClass('active-item').siblings().removeClass('active-item'); }}); imageSlider.find('.flex-control-thumbs li').append(''); }); }} function mkdInitInteractiveImage(){ var checkMarks=$('.mkd-interactive-image.mkd-checkmark'); var rows=checkMarks.closest('.vc_row'); if(rows.length){ rows.each(function(){ var row=$(this); if(checkMarks.length){ checkMarks.each(function(i){ var checkMark=$(this); var n=row.find(checkMarks).length; if(i>=n){ i=i - n; } checkMark.appear(function(){ $(this).find('.tick').delay(i*300).animate({'width': '53px'}, 400); },{accX: 0, accY: mkdGlobalVars.vars.mkdElementAppearAmount}); }); }}); }} function mkdInitIconSeparator(){ var iconSeparators=$('.mkd-separator-with-icon.mkd-animate'); if(iconSeparators.length){ iconSeparators.each(function(){ var iconSeparator=$(this); iconSeparator.appear(function(){ $(this).addClass('appeared'); },{accX: 0, accY: mkdGlobalVars.vars.mkdElementAppearAmount}); }); }} function mkdInitImageWithHoverInfo(){ var imageWithHoverInfo=$('.mkd-image-with-hover-info'); if(imageWithHoverInfo.length){ imageWithHoverInfo.each(function(){ var mask=$(this).find('.mkd-mask'); var content=$(this).find('.mkd-info'); var maskHeight=''; if((mask.outerHeight()-150) < content.outerHeight()){ maskHeight=content.outerHeight() + 150; mask.css({'height':maskHeight + 'px'}); mask.css({'top':-maskHeight + 'px'}); }}); }} function mkdInitSocialHover(){ var iconsSocial=$('.mkd-social-network-icon'); iconsSocial.each(function(){ var iconSocial=$(this); if(typeof iconSocial.data('hover-color')!=='undefined'&&iconSocial.data('hover-color')!==''){ var iconHoverHolder=iconSocial.parent(); var hoverColor=iconSocial.data('hover-color'); var originalColor=iconSocial.css('color'); iconHoverHolder.on("mouseenter", function(){ iconSocial.css('color',hoverColor); }); iconHoverHolder.on("mouseleave", function(){ iconSocial.css('color',originalColor); }); }}); } function mkdInitInteractiveIcon(){ var interactiveIcons=$('.mkd-interactive-icon'); if(interactiveIcons.length){ interactiveIcons.each(function(){ var interactiveIcon=$(this); var titleHeight; var initialContentHeight; var hoverContentHeight; interactiveIcon.animate({opacity:1}, 1000, 'easeOutSine'); titleHeight=interactiveIcon.find('.mkd-interactive-icon-title').outerHeight(); initialContentHeight=interactiveIcon.find('.mkd-interactive-icon-initial-content').outerHeight(); hoverContentHeight=interactiveIcon.find('.mkd-interactive-icon-hover-content').outerHeight() + titleHeight; if(initialContentHeight < hoverContentHeight){ interactiveIcon.find('.mkd-interactive-icon-inner').css({'height': parseInt(hoverContentHeight) + 'px'}); } var interactiveIconTopPosition=interactiveIcon.offset().top; var titleTopPosition=interactiveIcon.find('.mkd-interactive-icon-title').offset().top; var titleMovement=interactiveIconTopPosition - titleTopPosition - 10; interactiveIcon.find('.mkd-interactive-icon-hover-content').css({'top':parseInt(titleHeight)+'px'}); interactiveIcon.on('mouseenter', interactiveIcon, function(){ interactiveIcon.find('.mkd-interactive-icon-title').css('-webkit-transform','translateY('+parseInt(titleMovement)+'px)'); interactiveIcon.find('.mkd-interactive-icon-title').css('transform','translateY('+parseInt(titleMovement)+'px)'); }); interactiveIcon.on('mouseleave', interactiveIcon, function(){ interactiveIcon.find('.mkd-interactive-icon-title').css('-webkit-transform','translateY(0px)'); interactiveIcon.find('.mkd-interactive-icon-title').css('transform','translateY(0px)'); }); }); }} function mkdInitTeam(){ var teamShortcodes=$('.mkd-team'); if(teamShortcodes.length){ teamShortcodes.each(function(){ var teamShortcode=$(this); var infoHolder=teamShortcode.find('.mkd-team-info'); var triangle=teamShortcode.find('.mkd-team-triangle '); var triangleTop=infoHolder.offset().top - teamShortcode.offset().top; triangle.css({'top':triangleTop-12+'px'}); var teamSocialNetworks=['blogger','delicious','deviantart','dribbble','facebook','flickr','googledrive','instagram','myspace','picassa','pinterest','rss','share','skype','spotify','stumbleupon','tumblr','twitter','linkedin','wordpress','youtube']; for (var i=teamSocialNetworks.length - 1; i >=0; i--){ var teamSocialNetwork=teamSocialNetworks[i]; var teamSocialIcon=teamShortcode.find('.mkd-icon-element[class*="'+teamSocialNetwork+'"]'); teamSocialIcon.parent('a').append(''+teamSocialNetwork+''); }}); }} function mkdInitInteractiveBanner(){ var interactiveBanners=$('.mkd-interactive-banner'); if(interactiveBanners.length){ interactiveBanners.each(function(){ var interactiveBanner=$(this); var infoHolder=interactiveBanner.find('.mkd-interactive-banner-info'); var triangle=interactiveBanner.find('.mkd-interactive-banner-triangle '); var triangleTop=infoHolder.offset().top - interactiveBanner.offset().top; triangle.css({'top':triangleTop-12+'px'}); }); }} function mkdInitVideoBoxHolderAppear(){ var videoBox=$('.mkd-video-box'); if(videoBox.length){ videoBox.each(function(){ var thisVideoBox=$(this); var thisVideoBoxText=thisVideoBox.find('.mkd-video-box-text'); thisVideoBox.waitForImages(function(){ thisVideoBoxText.addClass('mkd-vtext-appear'); }); }); }} function mkdInitFullWidthSlider(){ var fullwidthSlider=$('.mkd-fullwidth-slider-slides'); if(fullwidthSlider.length){ fullwidthSlider.each(function(){ var thisFullwidthSlider=$(this); thisFullwidthSlider.appear(function(){ thisFullwidthSlider.css('visibility','visible'); },{accX: 0, accY: mkdGlobalVars.vars.mkdElementAppearAmount}); var interval=5000; var controlNav=true; var directionNav=false; var animationSpeed=600; if(typeof thisFullwidthSlider.data('animation-speed')!=='undefined'&&thisFullwidthSlider.data('animation-speed')!==false){ animationSpeed=thisFullwidthSlider.data('animation-speed'); } thisFullwidthSlider.owlCarousel({ singleItem: true, autoPlay: interval, addClassActive: true, navigation: directionNav, transitionStyle:'fade', autoHeight: true, pagination: controlNav, slideSpeed: animationSpeed }); }); }} })(jQuery); (function($){ 'use strict'; $(document).ready(function (){ mkdInitQuantityButtons(); mkdInitSelect2(); }); function mkdInitQuantityButtons(){ $(document).on('click', '.mkd-quantity-minus, .mkd-quantity-plus', function(e){ e.stopPropagation(); var button=$(this), inputField=button.siblings('.mkd-quantity-input'), step=parseFloat(inputField.attr('step')), max=parseFloat(inputField.attr('max')), minus=false, inputValue=parseFloat(inputField.val()), newInputValue; if(button.hasClass('mkd-quantity-minus')){ minus=true; } if(minus){ newInputValue=inputValue - step; if(newInputValue >=1){ inputField.val(newInputValue); }else{ inputField.val(1); }}else{ newInputValue=inputValue + step; if(max===undefined){ inputField.val(newInputValue); }else{ if(newInputValue >=max){ inputField.val(max); }else{ inputField.val(newInputValue); }} } inputField.trigger('change'); }); } function mkdInitSelect2(){ if($('.woocommerce-ordering .orderby').length||$('#calc_shipping_country').length){ $('.woocommerce-ordering .orderby').select2({ minimumResultsForSearch: Infinity }); $('#calc_shipping_country').select2(); }} })(jQuery); (function($){ 'use strict'; mkd.modules.portfolio={}; $(window).load(function(){ mkdPortfolioLoadMore(); mkdPortfolioSingleFollow().init(); }); var mkdPortfolioSingleFollow=function(){ var info=$('.mkd-follow-portfolio-info .small-images.mkd-portfolio-single-holder .mkd-portfolio-info-holder, ' + '.mkd-follow-portfolio-info .small-slider.mkd-portfolio-single-holder .mkd-portfolio-info-holder'); if(info.length){ var infoHolder=info.parent(), infoHolderOffset=infoHolder.offset().top, infoHolderHeight=infoHolder.height(), mediaHolder=$('.mkd-portfolio-media'), mediaHolderHeight=mediaHolder.height(), header=$('.header-appear, .mkd-fixed-wrapper'), headerHeight=(header.length) ? header.height():0; } var infoHolderPosition=function(){ if(info.length){ if(mediaHolderHeight > infoHolderHeight){ if(mkd.scroll > infoHolderOffset){ info.animate({ marginTop: (mkd.scroll - (infoHolderOffset) + mkdGlobalVars.vars.mkdAddForAdminBar + headerHeight + 20) }); }} }}; var recalculateInfoHolderPosition=function(){ if(info.length){ if(mediaHolderHeight > infoHolderHeight){ if(mkd.scroll > infoHolderOffset){ if(mkd.scroll + headerHeight + mkdGlobalVars.vars.mkdAddForAdminBar + infoHolderHeight + 20 < infoHolderOffset + mediaHolderHeight){ if($('.header-appear, .mkd-fixed-wrapper').length){ headerHeight=$('.header-appear, .mkd-fixed-wrapper').height(); } info.stop().animate({ marginTop: (mkd.scroll - (infoHolderOffset) + mkdGlobalVars.vars.mkdAddForAdminBar + headerHeight + 20) }); headerHeight=0; }else{ info.stop().animate({ marginTop: mediaHolderHeight - infoHolderHeight }); }}else{ info.stop().animate({ marginTop: 0 }); }} }}; return { init:function(){ infoHolderPosition(); $(window).scroll(function(){ recalculateInfoHolderPosition(); }); }};}; function mkdPortfolioLoadMore(){ if($('.mkd-ptf-list-load-more').length){ $('.mkd-ptf-list-load-more').each(function(){ $(this).find('.mkd-btn').animate({opacity:1},200); }); }} })(jQuery); !function(a){"use strict";function b(){var b=a("audio.mkd-blog-audio");b.mediaelementplayer({audioWidth:"100%"})}var c={};mkd.modules.blog=c,c.mkdInitAudioPlayer=b,a(document).ready(function(){b()}),a(window).load(function(){d().init()});var d=function(){var b=a(".mkd-blog-single");if(b.length){var c=b.find(".mkd-post-info-column-inner"),d=c.offset().top,e=c.outerHeight(),f=a(".mkd-post-text"),g=f.height(),h=a(".header-appear, .mkd-fixed-wrapper"),i=h.length?h.height():0;if(b.find("article").hasClass("format-link")||b.find("article").hasClass("format-quote")){var j=a(".mkd-post-content-column-inner"),k=a(".mkd-post-single-quote-link-content");g=j.outerHeight(!0)+k.outerHeight(!0)}}var l=function(){b.length&&mkd.windowWidth>600&&g>e&&mkd.scroll>d&&c.animate({marginTop:mkd.scroll-d+mkdGlobalVars.vars.mkdAddForAdminBar+i+20})},m=function(){b.length&&mkd.windowWidth>600&&g>e&&(mkd.scroll>d?mkd.scroll+i+mkdGlobalVars.vars.mkdAddForAdminBar+e+20screen_w?"desktop":768screen_w?"tablet":300screen_w?"mobile":300>screen_w?"mobile_portrait":""}function loadScript(url,$obj,callback){var script=document.createElement("script");script.type="text/javascript",script.readyState&&(script.onreadystatechange=function(){"loaded"!==script.readyState&&"complete"!==script.readyState||(script.onreadystatechange=null,callback())}),script.src=url,$obj.get(0).appendChild(script)}function vc_ttaActivation(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var $=window.jQuery,ui={};ui.newPanel=$(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,ui)})}function vc_accordionActivate(event,ui){if(ui.newPanel.length&&ui.newHeader.length){var $pie_charts=ui.newPanel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=ui.newPanel.find(".vc_round-chart"),$line_charts=ui.newPanel.find(".vc_line-chart"),$carousel=ui.newPanel.find('[data-ride="vc_carousel"]');void 0!==jQuery.fn.isotope&&ui.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),vc_carouselBehaviour(ui.newPanel),vc_plugin_flexslider(ui.newPanel),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),ui.newPanel.parents(".isotope").length&&ui.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}}function initVideoBackgrounds(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}function vc_initVideoBackgrounds(){jQuery("[data-vc-video-bg]").each(function(){var youtubeUrl,youtubeId,$element=jQuery(this);$element.data("vcVideoBg")?(youtubeUrl=$element.data("vcVideoBg"),youtubeId=vcExtractYoutubeId(youtubeUrl),youtubeId&&($element.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground($element,youtubeId)),jQuery(window).on("grid:items:added",function(event,$grid){$element.has($grid).length&&vcResizeVideoBackground($element)})):$element.find(".vc_video-bg").remove()})}function insertYoutubeVideoAsBackground($element,youtubeId,counter){if("undefined"==typeof YT||void 0===YT.Player)return 100<(counter=void 0===counter?0:counter)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground($element,youtubeId,counter++)},100);var $container=$element.prepend('
').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px",iframeW+="px",iframeH+="px"):(iframeW=containerW,iframeH=containerW*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px",iframeW+="px",iframeH+="px"),$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}function vcExtractYoutubeId(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}function vc_googleMapsPointer(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.click(function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.mouseleave(function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}function vc_setHoverBoxPerspective(hoverBox){hoverBox.each(function(){var $this=jQuery(this),width=$this.width(),perspective=4*width+"px";$this.css("perspective",perspective)})}function vc_setHoverBoxHeight(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=frontHeight>backHeight?frontHeight:backHeight;hoverBoxHeight<250&&(hoverBoxHeight=250),hoverBoxInner.css("min-height",hoverBoxHeight+"px")})}function vc_prepareHoverBox(){var hoverBox=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(hoverBox),vc_setHoverBoxPerspective(hoverBox)}document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",function(){for(var prefix=["-webkit-","-moz-","-ms-","-o-",""],i=0;iparseInt(ver[1]);$call.each(function(index){var $tabs,interval=jQuery(this).attr("data-interval"),tabs_array=[];if($tabs=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(event,ui){wpb_prepare_tab_content(event,ui)},beforeActivate:function(event,ui){1!==ui.newPanel.index()&&ui.newPanel.find(".vc_pie_chart:not(.vc_ready)")},activate:function(event,ui){wpb_prepare_tab_content(event,ui)}}),interval&&0index?index=$tabs.tabs("length")-1:index>=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)}else{var index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length;index=jQuery(this).parent().hasClass("wpb_next_slide")?index+1>=length?0:index+1:0>index-1?length-1:index-1,$tabs.tabs("option","active",index)}})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,$this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).click(function(e){e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1");var carousele_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousele_li.css({"margin-right":carousele_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).resize(function(){var before_resize=screen_size;screen_size=getSizeName(),before_resize!=screen_size&&window.setTimeout("location.reload()",20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){location.href.indexOf("#!prettyPhoto")>-1&&(location.hash="")},social_tools:""})}catch(err){window.console&&window.console.log&&console.log(err)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){function fullWidthRow(){var $elements=$('[data-vc-full-width="true"]');$.each($elements,function(key,item){var $el=$(this);$el.addClass("vc_hidden");var $el_full=$el.next(".vc_row-full-width");if($el_full.length||($el_full=$el.parent().next(".vc_row-full-width")),$el_full.length){var el_margin_left=parseInt($el.css("margin-left"),10),el_margin_right=parseInt($el.css("margin-right"),10),offset=0-$el_full.offset().left-el_margin_left,width=$(window).width();if($el.css({position:"relative",left:offset,"box-sizing":"border-box",width:$(window).width()}),!$el.data("vcStretchContent")){var padding=-1*offset;0>padding&&(padding=0);var paddingRight=width-padding-$el_full.width()+el_margin_left+el_margin_right;0>paddingRight&&(paddingRight=0),$el.css({"padding-left":padding+"px","padding-right":paddingRight+"px"})}$el.attr("data-vc-full-width-init","true"),$el.removeClass("vc_hidden"),$(document).trigger("vc-full-width-row-single",{el:$el,offset:offset,marginLeft:el_margin_left,marginRight:el_margin_right,elFull:$el_full,width:width})}}),$(document).trigger("vc-full-width-row",$elements)}function fullHeightRow(){var $element=$(".vc_row-o-full-height:first");if($element.length){var $window,windowHeight,offsetTop,fullHeight;$window=$(window),windowHeight=$window.height(),offsetTop=$element.offset().top,offsetTop0||navigator.userAgent.match(/Trident.*rv\:11\./))&&$(".vc_row-o-full-height").each(function(){"flex"===$(this).css("display")&&$(this).wrap('
')})}(),vc_initVideoBackgrounds(),function(){var vcSkrollrOptions,callSkrollInit=!1;window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSpeed,skrollrSize,skrollrStart,skrollrEnd,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),$parallaxElement=$("
").addClass("vc_parallax-inner").appendTo($(this)),$parallaxElement.height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),youtubeId=vcExtractYoutubeId(parallaxImage),youtubeId?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrSpeed=skrollrSize-100,skrollrStart=-skrollrSpeed,skrollrEnd=0,$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: "+skrollrEnd+"%;")}),!(!callSkrollInit||!window.skrollr)&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}()}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(event,ui){var $ui_panel,$google_maps,panel=ui.panel||ui.newPanel,$pie_charts=panel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=panel.find(".vc_round-chart"),$line_charts=panel.find(".vc_line-chart"),$carousel=panel.find('[data-ride="vc_carousel"]');if(vc_carouselBehaviour(),vc_plugin_flexslider(panel),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),panel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&panel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),$ui_panel=panel.find(".isotope, .wpb_image_grid_ul"),$google_maps=panel.find(".wpb_gmaps_widget"),0<$ui_panel.length&&$ui_panel.isotope("layout"),$google_maps.length&&!$google_maps.is(".map_ready")){var $frame=$google_maps.find("iframe");$frame.attr("src",$frame.attr("src")),$google_maps.addClass("map_ready")}panel.parents(".isotope").length&&panel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),window.vc_googleMapsPointer,jQuery(document).ready(vc_prepareHoverBox),jQuery(window).resize(vc_prepareHoverBox),jQuery(document).ready(function($){window.vc_js()}); !function(a){"use strict";function b(){a(document).on("click",".mkd-like",function(){var b,c=a(this),d=c.attr("id");if(c.hasClass("liked"))return!1;"undefined"!=typeof c.data("type")&&(b=c.data("type"));var e={action:"libero_mikado_like",likes_id:d,type:b};a.post(mkdLike.ajaxurl,e,function(a){c.html(a).addClass("liked").attr("title","You already like this!"),"portfolio_list"!==b&&c.children("span").css("opacity",1)});return!1})}a(document).ready(function(){b()})}(jQuery); jQuery(document).ready(function ($){ $('.zoom-social_icons-list__link').on({ 'mouseenter': function (e){ e.preventDefault(); var $this=$(this).find('.zoom-social_icons-list-span'); var $rule=$this.data('hover-rule'); var $color=$this.data('hover-color'); if($color!==undefined){ $this.attr('data-old-color', $this.css($rule)); $this.css($rule, $color); }}, 'mouseleave': function (e){ e.preventDefault(); var $this=$(this).find('.zoom-social_icons-list-span'); var $rule=$this.data('hover-rule'); var $oldColor=$this.data('old-color'); if($oldColor!==undefined){ $this.css($rule, $oldColor); }} }); }); !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); !function($){function getHashtag(){var url=location.href;return hashtag=-1!==url.indexOf("#prettyPhoto")&&decodeURI(url.substring(url.indexOf("#prettyPhoto")+1,url.length)),hashtag&&(hashtag=hashtag.replace(/<|>/g,"")),hashtag}function setHashtag(){"undefined"!=typeof theRel&&(location.hash=theRel+"/"+rel_index+"/")}function clearHashtag(){-1!==location.href.indexOf("#prettyPhoto")&&(location.hash="prettyPhoto")}function getParam(name,url){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regexS="[\\?&]"+name+"=([^&#]*)",regex=new RegExp(regexS),results=regex.exec(url);return null==results?"":results[1]}$.prettyPhoto={version:"3.1.6"};var options=$.prettyPhoto.options={hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'
\t\t\t\t\t\t
 
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\tExpand \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\tnext \t\t\t\t\t\t\t\t\t\t\tprevious \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\tPrevious \t\t\t\t\t\t\t\t\t\t\t\t

0/0

\t\t\t\t\t\t\t\t\t\t\t\tNext \t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t

\t\t\t\t\t\t\t\t\t\t\t
{pp_social}
\t\t\t\t\t\t\t\t\t\t\tClose \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t
\t\t\t\t\t
',gallery_markup:'',image_markup:'',flash_markup:'',quicktime_markup:'',iframe_markup:'',inline_markup:'
{content}
',custom_markup:"",social_tools:'